18 if (code <= 9)
return static_cast<Key>(
'0' + code);
19 if (code == 10)
return Key::KEY_YES;
20 if (code == 11)
return Key::KEY_NO;
25 char c =
static_cast<char>(k);
26 if (c >=
'0' && c <=
'9')
return c -
'0';
27 if (c ==
'Y')
return 10;
28 if (c ==
'N')
return 11;
39 if (!kp)
return false;
51 int code = key_to_code(k);
53 *out_key =
static_cast<uint8_t
>(code);
int host_key_consume_next(uint8_t *out_key)
Pop the next queued key press, if any.
bool host_key_pressed(uint8_t key)
True while key is currently held down.
CDC Badge OS plugin host API - canonical C ABI contract.
#define HOST_ERR_INVALID_ARG
#define HOST_ERR_NOT_FOUND
IKeypad * getKeypadInstance()
Returns the singleton keypad service instance.