I've made some redesigns to help make things simpler and that was to use .NET rather than using Windows API directly. It's now easier to edit the XML files as well.
The new code is located here:
GitHub - Jimbobnz/ABL-Virtual-Keyboard-.NET: ABL Virtual Keyboard using .NET
Changes need for this to work correctly. In the main block of your application you will need to change the WAIT-FOR statement:
Code:
IF NOT THIS-PROCEDURE:PERSISTENT THEN .
/* WAIT-FOR CLOSE OF THIS-PROCEDURE. */
WAIT-FOR System.Windows.Forms.Application:Run().
The XML code has changed to include some extra attributes for CTRL and ALT keys so you can do multi-key presses .i.e
CTRL+SHIFT+ALT+F2
The key-value attribute has changed from using a numerical value to a character literal value. i.e. 'A' is not the same as 'a'.
Known problems:
- CTRL+A (Select ALL) does not seem to work, but COPY and PASTE does. I think OPENEDGE
CTRL+A
is translated as APPEND-LINE.
- THE left & right navigation keys don't seem to behave correctly on decimal fields.
TODO:
- Somehow dynamically detect widget has the current focus and test to see if it's a decimal datatype. If the condition is true, then override the default LEFT & RIGHT keypresses with ABL
APPLY CURSOR-LEFT
or APPLY CURSOR-RIGHT
statements.
Code:
<keyboard key-label="PASTE" shift-key="false" ctrl-key="true" alt-key="false" key-value="v" layer="1" row="5" pos="3">
<width>61</width>
<height>28</height>
<indent>0</indent>
<sensitive>true</sensitive>
<image-up/>
<image-dwn/>
</keyboard>
USE THE .NET SPECIAL KET CODES:
- BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
- BREAK {BREAK}
- CAPS LOCK {CAPSLOCK}
- DEL or DELETE {DELETE} or {DEL}
- DOWN ARROW {DOWN}
- END {END}
- ENTER {ENTER}
- HELP {HELP}
- HOME {HOME}
- INS or INSERT {INSERT} or {INS}
- LEFT ARROW {LEFT}
- NUM LOCK {NUMLOCK}
- PAGE DOWN {PGDN}
- PAGE UP {PGUP}
- PRINT SCREEN {PRTSC} (reserved for future use)
- RIGHT ARROW {RIGHT}
- SCROLL LOCK {SCROLLLOCK}
- TAB {TAB}
- UP ARROW {UP}
- F1 {F1}
- F2 {F2}
- F3 {F3}
- F4 {F4}
- F5 {F5}
- F6 {F6}
- F7 {F7}
- F8 {F8}
- F9 {F9}
- F10 {F10}
- F11 {F11}
- F12 {F12}
- F13 {F13}
- F14 {F14}
- F15 {F15}
- F16 {F16}
- Keypad add {ADD}
- Keypad subtract {SUBTRACT}
- Keypad multiply {MULTIPLY}
- Keypad divide {DIVIDE}