| 1483 | } |
| 1484 | |
| 1485 | int encode_command_as_key(command_type cmd) noexcept |
| 1486 | { |
| 1487 | // Don't accept buggy commands |
| 1488 | if (cmd < CMD_NO_CMD || cmd >= CMD_MAX_CMD) |
| 1489 | cmd = CMD_NO_CMD; |
| 1490 | |
| 1491 | // There should be room between the internal keys |
| 1492 | // (CK_MIN_INTERNAL == -1021) and keys with alt set |
| 1493 | // (about -3000 + 255) for command_type to fit |
| 1494 | // (currently 2000 through 2287). |
| 1495 | return -(int)cmd; |
| 1496 | } |
no outgoing calls
no test coverage detected