summaryrefslogtreecommitdiff
path: root/noncore/applets/zkbapplet/keyzcfg
Unidiff
Diffstat (limited to 'noncore/applets/zkbapplet/keyzcfg') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp b/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp
index b2180ba..a47bf6c 100644
--- a/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp
+++ b/noncore/applets/zkbapplet/keyzcfg/zkbnames.cpp
@@ -2,16 +2,18 @@
2 2
3#include "zkbnames.h" 3#include "zkbnames.h"
4 4
5QString Null_String((const char*) 0); 5QString Null_String((const char*) 0);
6 6
7// Implementation of KeyNames 7// Implementation of KeyNames
8static struct { 8struct Key_Names_t {
9 int key; 9 int key;
10 char *name; 10 char *name;
11} Key_Names[] = { 11};
12
13static const Key_Names_t Key_Names[] = {
12 { 32, "Space" }, 14 { 32, "Space" },
13 { 39, "Apostrophe" }, 15 { 39, "Apostrophe" },
14 { 44, "Comma" }, 16 { 44, "Comma" },
15 { 46, "Period" }, 17 { 46, "Period" },
16 { 47, "Slash" }, 18 { 47, "Slash" },
17 { 65, "A" }, 19 { 65, "A" },
@@ -102,16 +104,18 @@ const QString& KeyNames::find(int k) {
102 } else { 104 } else {
103 return it.data(); 105 return it.data();
104 } 106 }
105} 107}
106 108
107// Implementation of ModifierNames 109// Implementation of ModifierNames
108struct { 110struct Modifier_Names_t {
109 int value; 111 int value;
110 char* name; 112 char* name;
111} Modifier_Names[] = { 113};
114
115static const Modifier_Names_t Modifier_Names[] = {
112 { 8, "Shift" }, 116 { 8, "Shift" },
113 { 16, "Control" }, 117 { 16, "Control" },
114 { 32, "Alt" }, 118 { 32, "Alt" },
115 { 0x4000, "Keypad" }, 119 { 0x4000, "Keypad" },
116 { 0, 0 } 120 { 0, 0 }
117}; 121};
@@ -156,16 +160,18 @@ const QString& ModifierNames::find(int k) {
156 return it.data(); 160 return it.data();
157 } 161 }
158} 162}
159 163
160// Implementation of KeycodeNames 164// Implementation of KeycodeNames
161 165
162struct { 166struct Keycode_Names_t {
163 char* name; 167 char* name;
164 int keycode; 168 int keycode;
165} Keycode_Names[] = { 169};
170
171static const Keycode_Names_t Keycode_Names[] = {
166 { "Escape", 0x1000 }, 172 { "Escape", 0x1000 },
167 { "Tab", 0x1001 }, 173 { "Tab", 0x1001 },
168 { "Backtab", 0x1002 }, 174 { "Backtab", 0x1002 },
169 { "Backspace", 0x1003 }, 175 { "Backspace", 0x1003 },
170 { "BackSpace", 0x1003 }, 176 { "BackSpace", 0x1003 },
171 { "Return", 0x1004 }, 177 { "Return", 0x1004 },