diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-11 16:46:53 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-11 16:46:53 +0400 |
commit | 2f503f6d09cc955426761d48c794c50968290a21 (patch) | |
tree | e74c469e4448c53b5c192dc3e0e45599d7aa9ae0 /intern | |
parent | c9a7e7e392048d580f6e1ce22c750f76c8e8817d (diff) |
Bug fix #799 revisited
Now we're on the root of the problem. Ghost (OSX) didn't accept rawkeys
for the 1-2-...0 keys on a french keyboard. These have apparently different
symbols on it. (these silly french! :)
This commit intercepts the rawkeys in convertKey() call, and manually
makes sure theyre correctly mapped.
So: now french (spanish, etc) OSX users can finally use layer hotkeys! And
the popup menu shortcuts! :)
Tested & verified by Lukep. Merci!
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCarbon.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index db495a33507..d6d6d6f7a6c 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -107,8 +107,22 @@ static GHOST_TKey convertKey(int rawCode) unsigned char vk = KeyTranslate(transData, rawCode, &dummy); /* Map numpad based on rawcodes first, otherwise they * look like non-numpad events. + * Added too: mapping the number keys, for french keyboards etc (ton) */ + // printf("GHOST: vk: %d %c raw: %d\n", vk, vk, rawCode); + switch (rawCode) { + case 18: return GHOST_kKey1; + case 19: return GHOST_kKey2; + case 20: return GHOST_kKey3; + case 21: return GHOST_kKey4; + case 23: return GHOST_kKey5; + case 22: return GHOST_kKey6; + case 26: return GHOST_kKey7; + case 28: return GHOST_kKey8; + case 25: return GHOST_kKey9; + case 29: return GHOST_kKey0; + case 82: return GHOST_kKeyNumpad0; case 83: return GHOST_kKeyNumpad1; case 84: return GHOST_kKeyNumpad2; |