[client] input: add platform-neutral keycodes

This commit is contained in:
Geoffrey McRae
2026-09-12 10:12:18 +10:00
parent 382f35e503
commit 7ea69f3d1c
26 changed files with 1412 additions and 1000 deletions

View File

@@ -81,7 +81,7 @@ static void spiceSetStatusListener(void * opaque,
static bool spiceKeyDown(void * opaque, int key)
{
SpiceInput * input = opaque;
const uint32_t ps2 = linux_to_ps2[key];
const uint32_t ps2 = lg_keycode_to_ps2[key];
LG_LOCK(input->stateLock);
const bool result = input->available &&
@@ -93,7 +93,7 @@ static bool spiceKeyDown(void * opaque, int key)
static bool spiceKeyUp(void * opaque, int key)
{
SpiceInput * input = opaque;
const uint32_t ps2 = linux_to_ps2[key];
const uint32_t ps2 = lg_keycode_to_ps2[key];
LG_LOCK(input->stateLock);
const bool result = !ps2 || purespice_keyUp(ps2);