QKEY plugin

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
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).
 
#2
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>