mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13: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
|
||||
* XStringToKeysym() on some systems, so search for them instead in our
|
||||
* mapping table. */
|
||||
size_t i;
|
||||
const size_t specialCharacterCount =
|
||||
sizeof(XSpecialCharacterTable) / sizeof(XSpecialCharacterTable[0]);
|
||||
for (i = 0; i < specialCharacterCount; ++i) {
|
||||
if (c == XSpecialCharacterTable[i].name) {
|
||||
code = XSpecialCharacterTable[i].code;
|
||||
struct XSpecialCharacterMapping* xs = XSpecialCharacterTable;
|
||||
while (xs->name) {
|
||||
if (c == xs->name ) {
|
||||
code = xs->code;
|
||||
break;
|
||||
}
|
||||
xs++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user