make DONT_SHADOW_SHIFTS=yes
makes a binary that doesn´t use Shift keys
This commit is contained in:
parent
833baaa5ba
commit
93030325bf
3 changed files with 13 additions and 2 deletions
5
Makefile
5
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 \
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue