mirror of
https://github.com/sheumann/VNCviewGS.git
synced 2024-11-22 02:30:47 +00:00
Flip the mapping of OA (Command) and Option keys.
This matches the de facto standard of Mac VNC implementations, although it's inconsistent with the labeling of Option as "Alt."
This commit is contained in:
parent
8c18d44109
commit
a44940a468
10
keyboard.cc
10
keyboard.cc
@ -134,16 +134,18 @@ void SendModifiers (void) {
|
|||||||
if (modifiers == oldModifiers)
|
if (modifiers == oldModifiers)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Apple key is sent as "meta" */
|
/* Apple key is sent as "alt" */
|
||||||
|
/* The opposite mapping of OA (Command) and Option might seem more logical,
|
||||||
|
* but this matches the de facto standard of Mac VNC implementations. */
|
||||||
if ((modifiers & appleKey) != (oldModifiers & appleKey))
|
if ((modifiers & appleKey) != (oldModifiers & appleKey))
|
||||||
SendKeyEvent(modifiers & appleKey, 0xFFE7);
|
SendKeyEvent(modifiers & appleKey, 0xFFE9);
|
||||||
|
|
||||||
if ((modifiers & shiftKey) != (oldModifiers & shiftKey))
|
if ((modifiers & shiftKey) != (oldModifiers & shiftKey))
|
||||||
SendKeyEvent(modifiers & shiftKey, 0xFFE1);
|
SendKeyEvent(modifiers & shiftKey, 0xFFE1);
|
||||||
|
|
||||||
/* Option key is sent as "alt," as per its labelling on some keyboards */
|
/* Option key is sent as "meta" */
|
||||||
if ((modifiers & optionKey) != (oldModifiers & optionKey))
|
if ((modifiers & optionKey) != (oldModifiers & optionKey))
|
||||||
SendKeyEvent(modifiers & optionKey, 0xFFE9);
|
SendKeyEvent(modifiers & optionKey, 0xFFE7);
|
||||||
|
|
||||||
if ((modifiers & controlKey) != (oldModifiers & controlKey))
|
if ((modifiers & controlKey) != (oldModifiers & controlKey))
|
||||||
SendKeyEvent(modifiers & controlKey, 0xFFE3);
|
SendKeyEvent(modifiers & controlKey, 0xFFE3);
|
||||||
|
Loading…
Reference in New Issue
Block a user