|My-T-Soft®: for Windows; Indestructible Keyboards and Indispensable Utilities; Version 1.80; User's Guide|
|Prev||Chapter 9. Operation Notes||Next|
The following double-characters are reserved in Build-A-Macro:
@@ - Signifies an Alt keystroke to follow
e.g. @@f = [Alt-Down]f[Alt-Up]
~~ - Signifies a Ctrl keystroke to follow
^^ - Signifies a Shift keystroke to follow
$$ - used internally for internal macro uses
%% - used to specify a virtual key, internal keystroke, or a keyboard scan code
You may not use these character combinations in your macros, unless you use them as outlined. For example, you may quickly create a macro for File, New ([Alt]-F, N) by entering "@@fn" and clicking OK. However, using the Reserved words in brackets is the preferred method.
The %% sequence has 4 options, and must be formed properly to be interpreted as an special entry. 4 characters must follow the 2 percent signs, spaces are not allowed. When this is used, it generates both the Down and Up keyboard messages, (press & release), similar to the entry of a specific character.
The following general form is:
where c is a character signifying Keystroke or Scancode or Virtual Key Code or ProcessKey keystroke - The only valid characters are k or s or v or p (case does not matter)
The nnn must be 3 decimal digits (values between 000 and 999 are valid). Note that there are only 200+ keys on the panels and 255 Virtual keys - higher numbers may cause memory access errors!
The keystroke (k) numbers refer to the internal numbering of the keyboard - see below for a table of the standard 101 keyboard.
For example, to generate a F10 keystroke, you may use "%%k010" in the Build-A-Macro portion. In most cases, using the actual character will generate the appropriate scan codes internally, and this is only provided as an enhancement to provide more functionality in certain environments. Documented deficiencies include lack of support for the keys on the Numeric keypad panel. Additionally, by using the scancodes, macros can generate "keystrokes" for keys that are not present on the physical keyboard. Because of the hardware oriented nature of the actual scancode generated by the physical keyboard, and its interpretation by the system hardware and Windows, the scope of these issues requires that they be referenced in appropriate system manuals, and/or documentation on industry standards.
The Virtual Key (v) passes the Windows based Virtual key code directly through My-T-Soft. How an application interprets the virtual key code is dependent on regional, language, keyboard layout, and possibly other issues.
The ProcessKey (p) approach uses the internal ProcessKey function which handles more internal processing beyond the AcceptCode function handled by the k, s, or v options. This was added to allow macros to interact with the WordComplete panel on the Assistive Technology version.
Technical Information: The internal interface uses the AcceptCode approach which adds the keystroke to the buffer to be typed. This is managed in different ways as specified based on the k, v, or s options. The p option calls the internal ProcessKey that does various tasks prior to calling the AcceptCode function to insert the keystroke into the output buffer. Because of the tightly interwoven aspects of ProcessKey, the keyboard panel, and special options such as WordComplete, there may be side-effects if the %%pnnn is used extensively. There may also be other interactions with various other features (Show & Hide Keys, LetterAssist, etc.) that the direct AcceptCode approach will completely bypass. The intended use is to allow a single macro button to type a letter, and interact with the WordComplete panel in the Assistive Technology version.
It is probably worthwhile to state that each of these approaches is important dependent on the context that you want a particular keystroke. Is the keystroke dependent on the physical layout or virtual layout selected? Is the keystroke a character typed into the application with keyboard focus? Is the keystroke acting like it was typed on a the physical keyboard? Is the keystroke macro acting like it was typed on the virtual keyboard? Each can be valid and required depending on many factors. Supporting each possibility may explain one reason why the software has been around for 20 years.
%%knnn, e.g. %%k010 - uses the currently selected KMF (My-T-Soft layout) and looks up the virtual key / scan code information for this key, sends down/up keystrokes
%%snnn, e.g. %%s112 - sends the scancode, but processed internally. In most cases this will be the same virtual key code as specified, but it may be modified.
%%vnnn, e.g. %%v112 - sends the Windows Virtual Key (refer to Microsoft documentation) unmodified (note decimal notation, hex is not supported).
%%pnnn, e.g. %%p041 - uses the currently selected KMF (My-T-Soft layout) and looks up the virtual key / scan code information for this key, sends down/up keystrokes, and processes the key as if typed via the keyboard directly.
0 Escape Key
13 Select key
26 Back space
40 Caps Lock
52 Enter Key
53 Enter Key - make both waves 52.WAV & 53.WAV
54 Shift / Left Shift
65 Shift / Right Shift
67 Control / Left Control
68 Alt / Left Alt
69 Space Bar
70 Alt / Right Alt / Alt-Gr
71 Control / Left Control
These are on the edit panel
72 Print Screen
73 Scroll Lock
77 Page Up
80 Page Down
81 Up Arrow
82 Left Arrow
83 Down Arrow
84 Right Arrow
These are on the Numeric keypad panel
85 CL indicator / not processed as key
86 NL indicator / not processed as key
87 SL indicator / not processed as key
88 Num Lock
102 Enter / =
104 decimal point