GrafX2 2.9.3227
The ultimate 256-color painting program
|
Functions to convert bewteen the SDL key formats and the keycode we use in grafx2. More...
Functions | |
word | Key_for_scancode (word scancode) |
Helper function to convert between SDL system and the old coding for PC keycodes. More... | |
const char * | Key_name (word key) |
Returns key name in a string. More... | |
word | Get_Key_modifiers (void) |
Gets the Key modifiers in our format Returns a combination of GFX2_MOD_SHIFT, GFX2_MOD_ALT, GFX2_MOD_CTRL. More... | |
Functions to convert bewteen the SDL key formats and the keycode we use in grafx2.
The keycode we're using is generalized to handle mouse and joystick shortcuts as well. The format can be broken down as:
Helper function to convert between SDL system and the old coding for PC keycodes.
This is only used to convert configuration files from the DOS version of Grafx2, where keyboard codes are in in the IBM PC AT form.
scancode | Scancode to convert |
Referenced by Load_CFG().
const char * Key_name | ( | word | key | ) |
Returns key name in a string.
Used to display them in the helpscreens and in the keymapper window.
[in] | key | keycode of the key to translate, including modifiers |
References GFX2_MOD_ALT, GFX2_MOD_CTRL, GFX2_MOD_META, GFX2_MOD_SHIFT, KEY_BACKQUOTE, KEY_BACKSPACE, KEY_CAPSLOCK, KEY_CLEAR, KEY_COMMA, KEY_DELETE, KEY_DOWN, KEY_END, KEY_EQUALS, KEY_ESCAPE, KEY_F1, KEY_F10, KEY_F11, KEY_F12, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_HOME, KEY_INSERT, KEY_JOYBUTTON, KEY_KP0, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KP_DIVIDE, KEY_KP_ENTER, KEY_KP_EQUALS, KEY_KP_MINUS, KEY_KP_MULTIPLY, KEY_KP_PERIOD, KEY_KP_PLUS, KEY_LALT, KEY_LCTRL, KEY_LEFT, KEY_LEFTBRACKET, KEY_LSHIFT, KEY_MENU, KEY_MINUS, KEY_MOUSEMIDDLE, KEY_MOUSEWHEELDOWN, KEY_MOUSEWHEELUP, Key_name(), KEY_PAGEDOWN, KEY_PAGEUP, KEY_PAUSE, KEY_PERIOD, KEY_RALT, KEY_RCTRL, KEY_RETURN, KEY_RIGHT, KEY_RIGHTBRACKET, KEY_RSHIFT, KEY_SCROLLOCK, KEY_TAB, KEY_UNKNOWN, KEY_UP, and META_KEY_PREFIX.
Referenced by Key_name(), Keyboard_default_shortcut(), Keyboard_shortcut_value(), and Window_set_shortcut().
word Get_Key_modifiers | ( | void | ) |
Gets the Key modifiers in our format Returns a combination of GFX2_MOD_SHIFT, GFX2_MOD_ALT, GFX2_MOD_CTRL.
References GFX2_Log(), GFX2_MOD_ALT, GFX2_MOD_CTRL, GFX2_MOD_META, GFX2_MOD_SHIFT, and GFX2_WARNING.
Referenced by Compute_paintbrush_coordinates(), Get_input(), Grad_rectangle_12_9(), Line_12_5(), Rotate_brush_0_5(), Rotate_brush_1_5(), and Win32_WindowProc().