mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
Rather than trod on X11 keysyms, just check the meta keys in addition to the alt keys in Sys_AltDown. This way, if someone has a working X11 on Mac and they prefer to actually use their Alt keys, they can. The rest of us can use Cmd.
This commit is contained in:
parent
16625f0e7f
commit
e3d0f74cdc
1 changed files with 11 additions and 5 deletions
|
@ -1212,11 +1212,6 @@ bool Sys_AltDown(){
|
|||
|
||||
XQueryKeymap( GDK_DISPLAY(), keys );
|
||||
|
||||
#if defined ( __APPLE__ )
|
||||
#define XK_Alt_L XK_Meta_L
|
||||
#define XK_Alt_R XK_Meta_R
|
||||
#endif
|
||||
|
||||
x = XKeysymToKeycode( GDK_DISPLAY(), XK_Alt_L );
|
||||
if ( keys[x / 8] & ( 1 << ( x % 8 ) ) ) {
|
||||
return true;
|
||||
|
@ -1227,6 +1222,17 @@ bool Sys_AltDown(){
|
|||
return true;
|
||||
}
|
||||
|
||||
// For Apple, let users use their Command keys since Alt + X11 is hosed
|
||||
x = XKeysymToKeycode( GDK_DISPLAY(), XK_Meta_L );
|
||||
if ( keys[x / 8] & ( 1 << ( x % 8 ) ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
x = XKeysymToKeycode( GDK_DISPLAY(), XK_Meta_R );
|
||||
if ( keys[x / 8] & ( 1 << ( x % 8 ) ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue