mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
use while not for match special key map
This commit is contained in:
parent
cbf92c2601
commit
d087d797f0
@ -115,14 +115,13 @@ MMKeyCode keyCodeForChar(const char c){
|
|||||||
/* Some special keys are apparently not handled properly by
|
/* Some special keys are apparently not handled properly by
|
||||||
* XStringToKeysym() on some systems, so search for them instead in our
|
* XStringToKeysym() on some systems, so search for them instead in our
|
||||||
* mapping table. */
|
* mapping table. */
|
||||||
size_t i;
|
struct XSpecialCharacterMapping* xs = XSpecialCharacterTable;
|
||||||
const size_t specialCharacterCount =
|
while (xs->name) {
|
||||||
sizeof(XSpecialCharacterTable) / sizeof(XSpecialCharacterTable[0]);
|
if (c == xs->name ) {
|
||||||
for (i = 0; i < specialCharacterCount; ++i) {
|
code = xs->code;
|
||||||
if (c == XSpecialCharacterTable[i].name) {
|
|
||||||
code = XSpecialCharacterTable[i].code;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
xs++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user