Prerequisites
- Map the Edit functions in the Customize Keyboard window (for example Ctrl+C for edit copy function).
- Call the Start Keystroke Intercept (50) EHLLAPI function with
the call parameter data string value set. The values are as follows:
Byte Position Contents 1 One of the following values: - A specific host presentation space short name (PSID)
- A blank or null indicating a request for the host-connected host presentation space
2 to 4 Reserved 5 An option code character: - D for AID keystrokes only
- L for all keystrokes
- E for all keystrokes and Edit keys
- M for requesting the asynchronous message mode of the notification (Windows only). If M is specified, a code character D or L, or E must be placed in position 13
6 to 8 Reserved 9 to 12 If M is specified in position 5, the window handle of the window that receives the message. The message is a non-zero return value of RegisterWindowMessage (PCSHLL). 13 If M is specified in position 5, one of the following values: - D for AID keystrokes only
- L for all keystrokes
- E for all keystrokes and Edit keys
14 to 16 Reserved - To get the intercepted Edit keys, use the Get Key (51) EHLLAPI
function. The key mnemonic returned in the data string for the Edit
keys will have M (keystroke type mnemonic) at the 5th byte position.
The next 4 bytes will have one of the following Edit key mnemonics
based on the Edit key intercepted:
Key mnemonic Key intercepted @W@C Edit Copy @W@D Edit Clear @W@E Edit Copy Append @W@L Edit Copy Link @W@N Edit Paste Next @W@V Edit Paste @W@X Edit Cut @W@Z Edit Undo - To send Edit keys to the session, use the Send Key (3) EHLLAPI
function. The data string passed as the call parameter can specify
the following Edit key mnemonics:
Key mnemonic Key sent @W@C Edit Copy @W@D Edit Clear @W@E Edit Copy Append @W@L Edit Copy Link @W@N Edit Paste Next @W@V Edit Paste @W@X Edit Cut @W@Z Edit Undo
Note:
- You do not have to call the Get Key (51) EHLLAPI function to use the Send Key (3) function. For both Get Key (51) and Send Key (3) functions to handle Edit keys, you must first call Start Keystroke Intercept (50) with the 5th byte position set to E. If the 5th byte contains M, then position 13 must contain E.
- The expected return values for Start Keystroke Intercept (50), Get Key (51) and Send Key (3) functions have not changed.
- Any prerequisites from the existing documentation should be followed as well as the prerequisites documented here.