Permalink
Browse files

Add more key definitions

  • Loading branch information...
jacksonmj committed Mar 12, 2014
1 parent 92891f3 commit 1ca63b38133ce206a969b37bd19d9451bb02e61b
Showing with 21 additions and 1 deletion.
  1. +6 −0 src/PowderToySDL.cpp
  2. +15 −1 src/gui/interface/Keys.h
@@ -430,6 +430,12 @@ SDLKey MapNumpad(SDLKey key)
return KEY_HOME;
case KEY_NUM_END:
return KEY_END;
case KEY_NUM_PERIOD:
return KEY_DELETE;
case KEY_NUM_INS:
case KEY_NUM_PGUP:
case KEY_NUM_PGDOWN:
return KEY_UNKNOWN;
default:
return key;
}
@@ -1,6 +1,7 @@
#if defined(USE_SDL)
#include "SDL.h"
#define KEY_UNKNOWN SDLK_UNKNOWN
#define KEY_UP SDLK_UP
#define KEY_NUM_UP SDLK_KP8
#define KEY_DOWN SDLK_DOWN
@@ -13,14 +14,20 @@
#define KEY_NUM_HOME SDLK_KP7
#define KEY_END SDLK_END
#define KEY_NUM_END SDLK_KP1
#define KEY_NUM_INS SDLK_KP0
#define KEY_NUM_PGUP SDLK_KP9
#define KEY_NUM_PGDOWN SDLK_KP3
#define KEY_NUM_PERIOD SDLK_KP_PERIOD
#define KEY_BACKSPACE SDLK_BACKSPACE
#define KEY_DELETE SDLK_DELETE
#define KEY_DELETE SDLK_DELETE
#define KEY_TAB SDLK_TAB
#define KEY_RETURN SDLK_RETURN
#define KEY_ENTER SDLK_KP_ENTER
#define KEY_ESCAPE SDLK_ESCAPE
#define KEY_INSERT SDLK_INSERT
#define KEY_NUM_5 SDLK_KP5
#define KEY_LCTRL SDLK_LCTRL
#define KEY_LALT SDLK_LALT
#define KEY_LSHIFT SDLK_LSHIFT
@@ -62,6 +69,7 @@
#else
#define KEY_UNKNOWN 0
#define KEY_UP 1
#define KEY_NUM_UP 47
#define KEY_DOWN 2
@@ -82,6 +90,12 @@
#define KEY_ESCAPE 12
#define KEY_INSERT 46
#define KEY_NUM_INS 52
#define KEY_NUM_PGUP 53
#define KEY_NUM_PGDOWN 54
#define KEY_NUM_PERIOD 55
#define KEY_NUM_5 56
#define KEY_LCTRL 13
#define KEY_LALT 14
#define KEY_LSHIFT 15

0 comments on commit 1ca63b3

Please sign in to comment.