Prev | Home | Next
Overview |  | Popup menu

# 5. Keyboard mapping

## 5.1 Default mapping

The best way to do keypresses is by using your PC keyboard. The layout has been designed for American English (QWERTY) keyboards. Given that some TI keys does not exist on a real keyboard, we need to bind them on some PC keys. This depends on the calculator model you emulate.
Note that the keyboard mapping is the same as VTI, the well known TI emulator for Windows.

TI92(+)/V200 | PC |  | TI92+/V200 | PC
APPS | F9 | sin | Insert
THETA | ; | cos | Home
STO> | TAB | tan | Page Up
diamond | CTRL | CLEAR | Delete
2nd | ALT | ON | Scroll Lock
( | [ | ENTER1 | ENTER / NumPad ENTER
) | ] | ENTER2 | End [Linux]
HAND/LOCK | CAPS LOCK | ^ | Page Down
LN | \ |  |

TI89 (Titanium) | PC |  | TI89 (Titanium) | PC
CATALOG | F6 | MODE | `
APPS | F9 | | | \
STO> | TAB | EE | Insert
diamond | CTRL | CLEAR | Delete
2nd | ALT | ON | Scroll Lock
alpha | CAPS LOCK | ^ | Page Up
HOME | Home |  |  |

## 5.2 Custom mapping

With TiEmu, you can define and use your own mapping. This is done thru a 'keyboard mapping file' or 'keymap' for short. Keymaps are located in the skins folder and have the .map extension. Default keymaps are ti89.map (TI89, TI89 Titanium) and ti92.map (TI92, TI92+, V200PLT).
Those keymaps are text files with a straightforward syntax :

    Model: TI89t

    // English mapping (VTi-compatible)

    // Alphabetical

    PCKEY_A:TIKEY_EQUALS,TIKEY_ALPHA

    PCKEY_OEM_SCROLL:TIKEY_ON

Model can be 'ti89', 'ti92', 'ti92+', 'v200' or 'ti89t'.
Comments can be placed in the file:; they have to start with a '//' character.
Next, there are some key pairs: "PCKEY_xxx:TIKEY_xxx,TIKEY_yyy". PCKEY_xxx is the input key, TIKEY_xxx, TIKEY_yyy are the output keys.
If you want to write your own keymap, you may need to know which scancode to bind to. TiEmu can help you by displaying it if you set the 'kbd_dbg' variable in the tiemu.ini file to 'yes'. Windows users will have to set the 'console' variable to 'yes', too.
List of TI keys:

const KeyTuple tikeys[] = { { TIKEY_DOWN, "TIKEY_DOWN" }, { TIKEY_RIGHT, "TIKEY_RIGHT" }, { TIKEY_UP, "TIKEY_UP" }, { TIKEY_LEFT, "TIKEY_LEFT" }, { TIKEY_HAND, "TIKEY_HAND" }, { TIKEY_SHIFT, "TIKEY_SHIFT" }, { TIKEY_DIAMOND, "TIKEY_DIAMOND" }, { TIKEY_2ND, "TIKEY_2ND" }, { TIKEY_3, "TIKEY_3" }, { TIKEY_2, "TIKEY_2" }, { TIKEY_1, "TIKEY_1" }, { TIKEY_F8, "TIKEY_F8" }, { TIKEY_W, "TIKEY_W" }, { TIKEY_S, "TIKEY_S" }, { TIKEY_Z, "TIKEY_Z" }, { TIKEY_6, "TIKEY_6" }, { TIKEY_5, "TIKEY_5" }, { TIKEY_4, "TIKEY_4" }, { TIKEY_F3, "TIKEY_F3" }, { TIKEY_E, "TIKEY_E" }, { TIKEY_D, "TIKEY_D" }, { TIKEY_X, "TIKEY_X" }, { TIKEY_9, "TIKEY_9" }, { TIKEY_8, "TIKEY_8" }, { TIKEY_7, "TIKEY_7" }, { TIKEY_F7, "TIKEY_F7" }, { TIKEY_R, "TIKEY_R" }, { TIKEY_F, "TIKEY_F" }, { TIKEY_C, "TIKEY_C" }, { TIKEY_STORE, "TIKEY_STORE" }, { TIKEY_COMMA, "TIKEY_COMMA" }, { TIKEY_PARIGHT, "TIKEY_PARIGHT" }, { TIKEY_PALEFT, "TIKEY_PALEFT" }, { TIKEY_F2, "TIKEY_F2" }, { TIKEY_T, "TIKEY_T" }, { TIKEY_G, "TIKEY_G" }, { TIKEY_V, "TIKEY_V" }, { TIKEY_SPACE, "TIKEY_SPACE"}, { TIKEY_TAN, "TIKEY_TAN"}, { TIKEY_COS, "TIKEY_COS" }, { TIKEY_SIN, "TIKEY_SIN" }, { TIKEY_F6, "TIKEY_F6" }, { TIKEY_Y, "TIKEY_Y" }, { TIKEY_H, "TIKEY_H" }, { TIKEY_B, "TIKEY_B" }, { TIKEY_DIVIDE, "TIKEY_DIVIDE"}, { TIKEY_P, "TIKEY_P"}, { TIKEY_ENTER2, "TIKEY_ENTER2"}, { TIKEY_LN, "TIKEY_LN" }, { TIKEY_F1, "TIKEY_F1" }, { TIKEY_U, "TIKEY_U" }, { TIKEY_J, "TIKEY_J" }, { TIKEY_N, "TIKEY_N" }, { TIKEY_POWER, "TIKEY_POWER"}, { TIKEY_MULTIPLY, "TIKEY_MULTIPLY" }, { TIKEY_APPS, "TIKEY_APPS" }, { TIKEY_CLEAR, "TIKEY_CLEAR" }, { TIKEY_F5, "TIKEY_F5" }, { TIKEY_I, "TIKEY_I" }, { TIKEY_K, "TIKEY_K" }, { TIKEY_M, "TIKEY_M" }, { TIKEY_EQUALS, "TIKEY_EQUALS"}, { TIKEY_NU, "TIKEY_NU"}, { TIKEY_ESCAPE, "TIKEY_ESCAPE"}, { TIKEY_MODE, "TIKEY_MODE"}, { TIKEY_PLUS, "TIKEY_PLUS"}, { TIKEY_O, "TIKEY_O" }, { TIKEY_L, "TIKEY_L" }, { TIKEY_THETA, "TIKEY_THETA" }, { TIKEY_BACKSPACE, "TIKEY_BACKSPACE" }, { TIKEY_NEGATE, "TIKEY_NEGATE"}, { TIKEY_PERIOD, "TIKEY_PERIOD" }, { TIKEY_0, "TIKEY_0" }, { TIKEY_F4, "TIKEY_F4" }, { TIKEY_Q, "TIKEY_Q" }, { TIKEY_A, "TIKEY_A" }, { TIKEY_ENTER1, "TIKEY_ENTER1"}, { TIKEY_MINUS, "TIKEY_MINUS"}, { TIKEY_ON, "TIKEY_ON"}, { TIKEY_ALPHA, "TIKEY_ALPHA" }, { TIKEY_EE, "TIKEY_EE" }, { TIKEY_CATALOG, "TIKEY_CATALOG" }, { TIKEY_HOME, "TIKEY_HOME" }, { TIKEY_PIPE, "TIKEY_PIPE" }, { TIKEY_VOID, "TIKEY_VOID"}, { -1, "" }, };

List of PC keys:

const KeyTuple pckeys[] = { { PCKEY_LBUTTON, "PCKEY_LBUTTON" }, { PCKEY_RBUTTON, "PCKEY_RBUTTON" }, { PCKEY_CANCEL, "PCKEY_CANCEL" }, { PCKEY_MBUTTON, "PCKEY_MBUTTON" }, { PCKEY_BACK, "PCKEY_BACK" }, { PCKEY_TAB, "PCKEY_TAB" }, { PCKEY_CLEAR, "PCKEY_CLEAR" }, { PCKEY_RETURN, "PCKEY_RETURN" }, { PCKEY_SHIFT, "PCKEY_SHIFT" }, { PCKEY_CONTROL, "PCKEY_CONTROL" }, { PCKEY_MENU, "PCKEY_MENU" }, { PCKEY_PAUSE, "PCKEY_PAUSE" }, { PCKEY_CAPITAL, "PCKEY_CAPITAL" }, { PCKEY_ESCAPE, "PCKEY_ESCAPE" }, { PCKEY_SPACE, "PCKEY_SPACE" }, { PCKEY_PRIOR, "PCKEY_PRIOR" }, { PCKEY_NEXT, "PCKEY_NEXT" }, { PCKEY_END, "PCKEY_END" }, { PCKEY_HOME, "PCKEY_HOME" }, { PCKEY_LEFT, "PCKEY_LEFT" }, { PCKEY_UP, "PCKEY_UP" }, { PCKEY_RIGHT, "PCKEY_RIGHT" }, { PCKEY_DOWN, "PCKEY_DOWN" }, { PCKEY_SELECT, "PCKEY_SELECT" }, { PCKEY_PRINT, "PCKEY_PRINT" }, { PCKEY_EXECUTE, "PCKEY_EXECUTE" }, { PCKEY_SNAPSHOT, "PCKEY_SNAPSHOT" }, { PCKEY_INSERT, "PCKEY_INSERT" }, { PCKEY_DELETE, "PCKEY_DELETE" }, { PCKEY_HELP, "PCKEY_HELP" }, { PCKEY_0, "PCKEY_0" }, { PCKEY_1, "PCKEY_1" }, { PCKEY_2, "PCKEY_2" }, { PCKEY_3, "PCKEY_3" }, { PCKEY_4, "PCKEY_4" }, { PCKEY_5, "PCKEY_5" }, { PCKEY_6, "PCKEY_6" }, { PCKEY_7, "PCKEY_7" }, { PCKEY_8, "PCKEY_8" }, { PCKEY_9, "PCKEY_9" }, { PCKEY_A, "PCKEY_A" }, { PCKEY_B, "PCKEY_B" }, { PCKEY_C, "PCKEY_C" }, { PCKEY_D, "PCKEY_D" }, { PCKEY_E, "PCKEY_E" }, { PCKEY_F, "PCKEY_F" }, { PCKEY_G, "PCKEY_G" }, { PCKEY_H, "PCKEY_H" }, { PCKEY_I, "PCKEY_I" }, { PCKEY_J, "PCKEY_J" }, { PCKEY_K, "PCKEY_K" }, { PCKEY_L, "PCKEY_L" }, { PCKEY_M, "PCKEY_M" }, { PCKEY_N, "PCKEY_N" }, { PCKEY_O, "PCKEY_O" }, { PCKEY_P, "PCKEY_P" }, { PCKEY_Q, "PCKEY_Q" }, { PCKEY_R, "PCKEY_R" }, { PCKEY_S, "PCKEY_S" }, { PCKEY_T, "PCKEY_T" }, { PCKEY_U, "PCKEY_U" }, { PCKEY_V, "PCKEY_V" }, { PCKEY_W, "PCKEY_W" }, { PCKEY_X, "PCKEY_X" }, { PCKEY_Y, "PCKEY_Y" }, { PCKEY_Z, "PCKEY_Z" }, { PCKEY_STARTKEY, "PCKEY_STARTKEY" }, { PCKEY_CONTEXTKEY, "PCKEY_CONTEXTKEY" }, { PCKEY_NUMPAD0, "PCKEY_NUMPAD0" }, { PCKEY_NUMPAD1, "PCKEY_NUMPAD1" }, { PCKEY_NUMPAD2, "PCKEY_NUMPAD2" }, { PCKEY_NUMPAD3, "PCKEY_NUMPAD3" }, { PCKEY_NUMPAD4, "PCKEY_NUMPAD4" }, { PCKEY_NUMPAD5, "PCKEY_NUMPAD5" }, { PCKEY_NUMPAD6, "PCKEY_NUMPAD6" }, { PCKEY_NUMPAD7, "PCKEY_NUMPAD7" }, { PCKEY_NUMPAD8, "PCKEY_NUMPAD8" }, { PCKEY_NUMPAD9, "PCKEY_NUMPAD9" }, { PCKEY_MULTIPLY, "PCKEY_MULTIPLY" }, { PCKEY_ADD, "PCKEY_ADD" }, { PCKEY_SEPARATOR, "PCKEY_SEPARATOR" }, { PCKEY_SUBTRACT, "PCKEY_SUBTRACT" }, { PCKEY_DECIMAL, "PCKEY_DECIMAL" }, { PCKEY_DIVIDE, "PCKEY_DIVIDE" }, { PCKEY_F1, "PCKEY_F1" }, { PCKEY_F2, "PCKEY_F2" }, { PCKEY_F3, "PCKEY_F3" }, { PCKEY_F4, "PCKEY_F4" }, { PCKEY_F5, "PCKEY_F5" }, { PCKEY_F6, "PCKEY_F6" }, { PCKEY_F7, "PCKEY_F7" }, { PCKEY_F8, "PCKEY_F8" }, { PCKEY_F9, "PCKEY_F9" }, { PCKEY_F10, "PCKEY_F10" }, { PCKEY_F11, "PCKEY_F11" }, { PCKEY_F12, "PCKEY_F12" }, { PCKEY_F13, "PCKEY_F13" }, { PCKEY_F14, "PCKEY_F14" }, { PCKEY_F15, "PCKEY_F15" }, { PCKEY_F16, "PCKEY_F16" }, { PCKEY_F17, "PCKEY_F17" }, { PCKEY_F18, "PCKEY_F18" }, { PCKEY_F19, "PCKEY_F19" }, { PCKEY_F20, "PCKEY_F20" }, { PCKEY_F21, "PCKEY_F21" }, { PCKEY_F22, "PCKEY_F22" }, { PCKEY_F23, "PCKEY_F23" }, { PCKEY_F24, "PCKEY_F24" }, { PCKEY_NUMLOCK, "PCKEY_NUMLOCK" }, { PCKEY_OEM_SCROLL, "PCKEY_OEM_SCROLL" }, { PCKEY_OEM_1, "PCKEY_OEM_1" }, { PCKEY_OEM_PLUS, "PCKEY_OEM_PLUS" }, { PCKEY_OEM_COMMA, "PCKEY_OEM_COMMA" }, { PCKEY_OEM_MINUS, "PCKEY_OEM_MINUS" }, { PCKEY_OEM_PERIOD, "PCKEY_OEM_PERIOD" }, { PCKEY_OEM_2, "PCKEY_OEM_2" }, { PCKEY_OEM_3, "PCKEY_OEM_3" }, { PCKEY_OEM_4, "PCKEY_OEM_4" }, { PCKEY_OEM_5, "PCKEY_OEM_5" }, { PCKEY_OEM_6, "PCKEY_OEM_6" }, { PCKEY_OEM_7, "PCKEY_OEM_7" }, { PCKEY_OEM_8, "PCKEY_OEM_8" }, { PCKEY_ICO_F17, "PCKEY_ICO_F17" }, { PCKEY_ICO_F18, "PCKEY_ICO_F18" }, { PCKEY_OEM102, "PCKEY_OEM102" }, { PCKEY_ICO_HELP, "PCKEY_ICO_HELP" }, { PCKEY_ICO_00, "PCKEY_ICO_00" }, { PCKEY_ICO_CLEAR, "PCKEY_ICO_CLEAR" }, { PCKEY_OEM_RESET, "PCKEY_OEM_RESET" }, { PCKEY_OEM_JUMP, "PCKEY_OEM_JUMP" }, { PCKEY_OEM_PA1, "PCKEY_OEM_PA1" }, { PCKEY_OEM_PA2, "PCKEY_OEM_PA2" }, { PCKEY_OEM_PA3, "PCKEY_OEM_PA3" }, { PCKEY_OEM_WSCTRL, "PCKEY_OEM_WSCTRL" }, { PCKEY_OEM_CUSEL, "PCKEY_OEM_CUSEL" }, { PCKEY_OEM_ATTN, "PCKEY_OEM_ATTN" }, { PCKEY_OEM_FINNISH, "PCKEY_OEM_FINNISH" }, { PCKEY_OEM_COPY, "PCKEY_OEM_COPY" }, { PCKEY_OEM_AUTO, "PCKEY_OEM_AUTO" }, { PCKEY_OEM_ENLW, "PCKEY_OEM_ENLW" }, { PCKEY_OEM_BACKTAB, "PCKEY_OEM_BACKTAB" }, { PCKEY_ATTN, "PCKEY_ATTN" }, { PCKEY_CRSEL, "PCKEY_CRSEL" }, { PCKEY_EXSEL, "PCKEY_EXSEL" }, { PCKEY_EREOF, "PCKEY_EREOF" }, { PCKEY_PLAY, "PCKEY_PLAY" }, { PCKEY_ZOOM, "PCKEY_ZOOM" }, { PCKEY_NONAME, "PCKEY_NONAME" }, { PCKEY_PA1, "PCKEY_PA1" }, { PCKEY_OEM_CLEAR, "PCKEY_OEM_CLEAR" }, { -1, "" }, };