MCPcopy Create free account
hub / github.com/crawl/crawl / _keycode_to_command

Function _keycode_to_command

crawl-ref/source/main.cc:2775–2795  ·  view source on GitHub ↗

We handle the synthetic keys, key_to_command() handles the real ones.

Source from the content-addressed store, hash-verified

2773// We handle the synthetic keys, key_to_command() handles the
2774// real ones.
2775static command_type _keycode_to_command(keycode_type key)
2776{
2777#ifndef USE_TILE_LOCAL
2778 // ignore all input if the terminal is too small
2779 if (crawl_state.smallterm)
2780 return CMD_NEXT_CMD;
2781#endif
2782
2783 switch (key)
2784 {
2785#ifdef USE_TILE
2786 case CK_MOUSE_CMD: return CMD_NEXT_CMD;
2787#endif
2788
2789 case KEY_MACRO_DISABLE_MORE: return CMD_DISABLE_MORE;
2790 case KEY_MACRO_ENABLE_MORE: return CMD_ENABLE_MORE;
2791
2792 default:
2793 return key_to_command(key, KMC_DEFAULT);
2794 }
2795}
2796
2797static keycode_type _get_next_keycode()
2798{

Callers 2

_get_next_cmdFunction · 0.85
_find_commandFunction · 0.85

Calls 1

key_to_commandFunction · 0.85

Tested by

no test coverage detected