win32 gui: remove bespoke/incorrect key translation

I played around with the API a bit and I tried out the other approach
where instead of trying to implement our own keyboard translation, instead
I just clear the "control key" before calling ToUnicode.  This fixes any
weird translation the OS was doing.

With this change, we no longer need to skip calling ToUnicode if the
control or alt keys are down, so keys will always work the same way whether
or not these modifiers are down.
This commit is contained in:
Jonathan Marler 2025-01-07 00:44:20 -07:00 committed by CJ van den Berg
parent 4c73948068
commit d90d82a4b7
3 changed files with 25 additions and 40 deletions

View file

@ -80,5 +80,6 @@ pub const name_map = blk: {
.{ "escape", input.key.escape },
.{ "space", input.key.space },
.{ "backspace", input.key.backspace },
.{ "gt", '>' },
});
};