|
@@ -1220,7 +1220,7 @@ void la_SaveEvent(SYSWINDOW hwnd, laEvent *e, int use_last_pos){
|
|
|
laMappingRequestEval();
|
|
|
};
|
|
|
void la_SendKeyboardEvent(SYSWINDOW hwnd, int type, int key){
|
|
|
- laEvent *e = memAcquireSimple(sizeof(laEvent)); e->Type = type; e->key = key;
|
|
|
+ laEvent *e = memAcquireSimple(sizeof(laEvent)); e->Type = type; e->key = tolowerGuarded(key);
|
|
|
la_SaveEvent(hwnd, e, 1);
|
|
|
};
|
|
|
void la_SendInputEvent(SYSWINDOW hwnd, uint32_t Input){
|
|
@@ -6097,7 +6097,7 @@ laKeyMapItem *laAssignNewKey(laKeyMapper *km, char *Path, char *Operation, char
|
|
|
|
|
|
kmi->SpecialKeyBits = SpecialKeyBits;
|
|
|
kmi->EventType = EventType;
|
|
|
- kmi->Key = Key;
|
|
|
+ kmi->Key = tolowerGuarded(Key);
|
|
|
kmi->SelectBase = SelectBase;
|
|
|
|
|
|
lstAppendItem(&km->Items, kmi);
|
|
@@ -6823,10 +6823,10 @@ LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- //case WM_SYSKEYDOWN:
|
|
|
- // if (lparam & 0x40000000) break;
|
|
|
- // if (la_SendSpecialKey(hwnd, LA_STATE_DOWN, wparam))
|
|
|
- // break;
|
|
|
+ case WM_SYSKEYDOWN:
|
|
|
+ if (lparam & 0x40000000) break;
|
|
|
+ la_SendKeyboardEvent(hwnd, LA_KEY_DOWN, la_TranslateSpecialKey(wparam));
|
|
|
+ break;
|
|
|
case WM_KEYDOWN:
|
|
|
if (lparam & 0x40000000) break;
|
|
|
la_SendKeyboardEvent(hwnd, LA_KEY_DOWN, la_TranslateSpecialKey(wparam));
|
|
@@ -6834,10 +6834,9 @@ LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp
|
|
|
case WM_KEYUP:
|
|
|
la_SendKeyboardEvent(hwnd, LA_KEY_UP, la_TranslateSpecialKey(wparam));
|
|
|
break;
|
|
|
-
|
|
|
- //case WM_SYSKEYUP:
|
|
|
- // if (la_SendSpecialKey(hwnd, LA_STATE_UP, wparam));
|
|
|
- // break;
|
|
|
+ case WM_SYSKEYUP:
|
|
|
+ la_SendKeyboardEvent(hwnd, LA_KEY_UP, la_TranslateSpecialKey(wparam));
|
|
|
+ break;
|
|
|
case WM_UNICHAR:
|
|
|
la_SendInputEvent(hwnd, wparam);
|
|
|
break;
|