version 2.8
gwin_keyboard_layout.c
1 /*
2  * This file is subject to the terms of the GFX License. If a copy of
3  * the license was not distributed with this file, you can obtain one at:
4  *
5  * http://ugfx.org/license.html
6  */
7 
8 #include "../../gfx.h"
9 
10 #if GFX_USE_GWIN && GWIN_NEED_KEYBOARD
11 
12 #include "gwin_keyboard_layout.h"
13 
14 #if GWIN_NEED_KEYBOARD_ENGLISH1
15  /* For this keyboard mapping we use:
16  * Set 0 = Lowercase letters
17  * Set 1 = Uppercase letters (transient)
18  * Set 2 = Uppercase letters (locked)
19  * Set 3 = Numbers
20  * Set 4 = Symbols
21  */
22  static const GVSpecialKey Eng1SKeys[] = {
23  { "\001", 0, GVKEY_SINGLESET, 1 }, // \001 (1) = Shift Lower to Upper
24  { "\001", 0, GVKEY_INVERT|GVKEY_LOCKSET, 2 }, // \002 (2) = Shift Upper to Upper Lock
25  { "\002", 0, GVKEY_INVERT|GVKEY_LOCKSET, 0 }, // \003 (3) = Shift Upper Lock to Lower
26  { "123", 0, GVKEY_LOCKSET, 3 }, // \004 (4) = Change to Numbers
27  { "\010", "\b", 0, 0 }, // \005 (5) = Backspace
28  { "\015", "\r", 0, 0 }, // \006 (6) = Enter 1
29  { "\015", "\r", 0, 0 }, // \007 (7) = Enter 2 (Short keycap)
30  { "Sym", 0, GVKEY_LOCKSET, 4 }, // \010 (8) = Change to Symbols
31  { "aA", 0, GVKEY_LOCKSET, 0 }, // \011 (9) = Change to Lower Alpha
32  };
33  static const char Eng1Set0Row3[] = "\004 .\006\006";
34  static const char Eng1Set1Row0[] = "QWERTYUIOP";
35  static const char Eng1Set1Row1[] = "ASDFGHJKL";
36  static const char *Eng1Set0[] = { "qwertyuiop", "asdfghjkl", "\001zxcvbnm\005", Eng1Set0Row3, 0 };
37  static const char *Eng1Set1[] = { Eng1Set1Row0, Eng1Set1Row1, "\002ZXCVBNM\005", Eng1Set0Row3, 0 };
38  static const char *Eng1Set2[] = { Eng1Set1Row0, Eng1Set1Row1, "\003ZXCVBNM\005", Eng1Set0Row3, 0 };
39  static const char *Eng1Set3[] = { "+-*/", "@789", "\007456", "\010123", "\01100.", 0 };
40  static const char *Eng1Set4[] = { "#$%^&*()", "~`:;\"'{}", "<>?/\\|[]", "\011\004,! .@", 0 };
41  static const GVKeySet Eng1Sets[] = { Eng1Set0, Eng1Set1, Eng1Set2, Eng1Set3, Eng1Set4, 0 };
42  const GVKeyTable VirtualKeyboard_English1 = { Eng1SKeys, Eng1Sets };
43 #endif // GWIN_NEED_KEYBOARD_ENGLISH1
44 
45 #endif // GFX_USE_GWIN && GWIN_NEED_KEYBOARD
GWIN Virtual Keyboard Layout structures.