Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

QKEY plugin

May
12,845
164
This is new and somewhat experimental. Your comments and suggestions are welcome.

ftp://lucky.syr.edu/4plugins/qkey.zip

QKEY.TXT appears below.

QKEY is intended for actions which produce no output. Pressing a qkey will
have no effect on the current command line and will visually corrupt the
current command line if the keystroke produces any output so use "> NUL"
and/or "2> NUL" in qkey commands if it is appropriate. Key codes can be
obtained with "QKEY SHOW" (see below). At least for now, if you want qkeys automatically loaded, you'll have to use "QKEY LOAD" in your TCSTART file.

For example (using F7)

QKEY 65601 ACTIVATE "v - *" 2^> NUL

I use that one to switch to the "V" file viewer (if it's running).



QKEY N [<command>] | SAVE [profile] | LOAD [profile] | LIST | CLEAR | SHOW


QKEY N - deletes the qkey associated with key code N

QKEY N <command> - creates a qkey associated with key code N. Whitespace in
<command> is OK but special characters must be protected

QKEY SAVE [profile] - saves the current qkeys in HKCU\QKEY\DefaultProfile
or, if a profile name is specified, inHKCU\QKEY\profile; qkeys in the
profile not matching current ones are deleted

QKEY LOAD [profile] - loads the default/specified QKEY profile; current
qkeys are deleted

QKEY LIST - shows the current qkeys

QKEY CLEAR - deletes the current qkeys

QKEY SHOW - without a trailing space and without pressing <Enter>
... will display the key code of the next key pressed.
QKEY SHOW will not appear in the history. To make it easy to use
repeatedly, you might ALIAS @Alt-q QKEY SHOW (or something similar).
 
This is new and somewhat experimental. Your comments and suggestions are welcome.

ftp://lucky.syr.edu/4plugins/qkey.zip

QKEY.TXT appears below.<command><command><command><enter>

Build 2 is a little improved.

Build 2: Default profile is now HKCU\QKEY\Default.
Added support for auto-load and/or auto-save.
"showkey" replaces "qkey show".

QKEY is intended for actions which produce no output. Pressing a qkey will
have no effect on the current command line and will visually corrupt the
current command line if the keystroke produces any output so use "> NUL"
and/or "2> NUL" in qkey commands if it is appropriate. Key codes can be
obtained with "QKEY SHOW" (see below). At least for now, if you want qkeys
automatically loaded, you'll have to use "QKEY LOAD" in your TCSTART file.

For example (using F7)

QKEY 65601 ACTIVATE "v - *" 2^> NUL

I use that one to switch to the "V" file viewer (if it's running).

To get key codes, use "showkey".

"Showkey" is not a command. If "showkey" appears at the beginning of a
command line, in lower case, and without anything trailing, the QKEY
key handler will print the code of the next key pressed and give you
a new prompt. If you intend to do this a lot, I recommend a keystroke
alias similar to the following.

ALIAS @Alt-q showkey

Warning: When running in TCMD, TCC (and so the QKEY key handler) will
not see many possible key combinations.

QKEY Syntax:

QKEY N [command]
SAVE [profile]
LOAD [profile]
LIST
CLEAR
AUTO /L(oad) | /S(ave) [profile | 0]

QKEY N - deletes the qkey associated with key code N

QKEY N <command> - creates a qkey associated with key code N. Whitespace in
<command> is OK but special characters must be protected

QKEY SAVE [profile] - saves the current qkeys in HKCU\QKEY\Default
or, if a profile name is specified, inHKCU\QKEY\profile; qkeys in the
profile not matching current ones are deleted

QKEY LOAD [profile] - loads the default/specified QKEY profile; current
qkeys are deleted

QKEY LIST - shows the current qkeys

QKEY CLEAR - deletes the current qkeys

QKEY AUTO /L | /S [profile | 0] - configures automatic loading or saving; 0 = off;

</command></command></enter></command></command></command>
 
Hey @vefatica,
Do you have a 64-bit copy of your QKEY plugin?

If so, where can it be downloaded from?

Thanks from Joe
 
Hey @vefatica,
Do you have a 64-bit copy of your QKEY plugin?

If so, where can it be downloaded from?

Thanks from Joe
Yes I have one but, as old as it is, it won't work with newer TCCs because it uses functions which are no longer exported by TakeCmd.dll.

I'll try making the necessary changes.
 
This is going to be quite a job because Rex changed the way plugin key handlers work. One thing is for sure and it may be a game-stopper, namely, plugin key handlers do NOT see keystrokes when TCC is inside INPUT.
 
Hey @vefatica

Well, if plugin key handlers do not see keystrokes when TCC is inside INPUT, that is indeed a game stopper.

Thanks for the info.

Joe
 

Similar threads

Back
Top