diff --git a/Makefile b/Makefile index 977973e..e2982bd 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,11 @@ ifeq ($(FULL_WARNINGS), yes) CFLAGS += -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-unused-function -Wconversion -Wdouble-promotion -Wno-sign-conversion -fsanitize=undefined -fsanitize-trap endif +DONT_SHADOW_SHIFTS = no +ifeq ($(DONT_SHADOW_SHIFTS), yes) + CFLAGS += -DDONT_SHADOW_SHIFTS=1 +endif + DOTOS = src/emu_serial.o \ src/emu_emulate.o \ src/emu_init.o \ diff --git a/src/ui_sdl.c b/src/ui_sdl.c index 323e892..7cac7b3 100644 --- a/src/ui_sdl.c +++ b/src/ui_sdl.c @@ -708,17 +708,19 @@ static int SDLKeyToKey( SDLKey k ) case SDLK_ESCAPE: return HPKEY_ON; break; +#ifndef DONT_SHADOW_SHIFTS case SDLK_LSHIFT: return HPKEY_SHL; break; case SDLK_RSHIFT: - return HPKEY_SHL; + return HPKEY_SHR; break; +#endif case SDLK_LCTRL: return HPKEY_SHR; break; case SDLK_RCTRL: - return HPKEY_SHR; + return HPKEY_SHL; break; case SDLK_LALT: return HPKEY_ALPHA; diff --git a/src/ui_x11.c b/src/ui_x11.c index d441f96..0fb4900 100644 --- a/src/ui_x11.c +++ b/src/ui_x11.c @@ -2700,12 +2700,16 @@ int decode_key( XEvent* xev, KeySym sym, char* buf, int buflen ) key_event( HPKEY_ON, xev ); wake = 1; break; +#ifndef DONT_SHADOW_SHIFTS case XK_Shift_L: +#endif case XK_Control_R: key_event( HPKEY_SHL, xev ); wake = 1; break; +#ifndef DONT_SHADOW_SHIFTS case XK_Shift_R: +#endif case XK_Control_L: key_event( HPKEY_SHR, xev ); wake = 1;