@@ -42,20 +42,20 @@ class KeySequence
4242 // SHIFT | yes | yes | yes | no
4343 // none | no | no | no | yes
4444
45- auto shiftNeeded = mod & KeyMod.SHIFT ;
46- auto shiftGotten = s.mod & KeyMod.SHIFT ;
45+ auto shiftNeeded = mod & KeyMod.shift ;
46+ auto shiftGotten = s.mod & KeyMod.shift ;
4747 auto shiftMatch = shiftNeeded & shiftGotten || shiftNeeded == shiftGotten;
4848
49- auto ctrlNeeded = mod & KeyMod.CTRL ;
50- auto ctrlGotten = s.mod & KeyMod.CTRL ;
49+ auto ctrlNeeded = mod & KeyMod.ctrl ;
50+ auto ctrlGotten = s.mod & KeyMod.ctrl ;
5151 auto ctrlMatch = ctrlNeeded & ctrlGotten || ctrlNeeded == ctrlGotten;
5252
53- auto altNeeded = mod & KeyMod.ALT ;
54- auto altGotten = s.mod & KeyMod.ALT ;
53+ auto altNeeded = mod & KeyMod.alt ;
54+ auto altGotten = s.mod & KeyMod.alt ;
5555 auto altMatch = altNeeded & altGotten || altNeeded == altGotten;
5656
57- auto guiNeeded = mod & KeyMod.GUI ;
58- auto guiGotten = s.mod & KeyMod.GUI ;
57+ auto guiNeeded = mod & KeyMod.gui ;
58+ auto guiGotten = s.mod & KeyMod.gui ;
5959 auto guiMatch = guiNeeded & guiGotten || guiNeeded == guiGotten;
6060
6161 return shiftMatch && ctrlMatch && altMatch && guiMatch;
@@ -110,32 +110,32 @@ class KeySequence
110110 {
111111 import std.array ;
112112 auto toks = split(strip(seq));
113- KeyMod mod = KeyMod.NONE ;
113+ KeyMod mod = KeyMod.none ;
114114
115115 KeyMod stringToKeyMod (string s)
116116 {
117117 switch (s)
118118 {
119119 case " <ctrl>" :
120- return KeyMod.CTRL ;
120+ return KeyMod.ctrl ;
121121 case " <lctrl>" :
122- return KeyMod.RCTRL ;
122+ return KeyMod.rightCTRL ;
123123 case " <rctrl>" :
124- return KeyMod.LCTRL ;
124+ return KeyMod.leftCTRL ;
125125 case " <alt>" :
126- return KeyMod.ALT ;
126+ return KeyMod.alt ;
127127 case " <lalt>" :
128- return KeyMod.LALT ;
128+ return KeyMod.leftALT ;
129129 case " <ralt>" :
130- return KeyMod.RALT ;
130+ return KeyMod.rightALT ;
131131 case " <shift>" :
132- return KeyMod.SHIFT ;
132+ return KeyMod.shift ;
133133 case " <lshift>" :
134- return KeyMod.LSHIFT ;
134+ return KeyMod.leftShift ;
135135 case " <rshift>" :
136- return KeyMod.RSHIFT ;
136+ return KeyMod.rightShift ;
137137 default :
138- return KeyMod.NONE ;
138+ return KeyMod.none ;
139139 }
140140 }
141141
@@ -147,7 +147,7 @@ class KeySequence
147147 continue ;
148148
149149 auto m = stringToKeyMod(tok);
150- if (m != KeyMod.NONE )
150+ if (m != KeyMod.none )
151151 {
152152 mod = mod | m;
153153
@@ -165,7 +165,7 @@ class KeySequence
165165 tok = tok.chompPrefix(" <" ).chomp(" >" );
166166 }
167167 sequence ~= Key(stringToKeyCode(tok), mod);
168- mod = KeyMod.NONE ;
168+ mod = KeyMod.none ;
169169 }
170170 // std.stdio.writeln(sequence);
171171 }
0 commit comments