fix: map VK_OEM_102 to backslash

This is commonly the backslash key on internation keyboard layouts.

Also, log a warning when receiving events for unmapped virtual key codes.
This commit is contained in:
CJ van den Berg 2024-11-25 21:21:35 +01:00 committed by Tim Culverhouse
parent fe3f3cc74e
commit 1346e3535d

View file

@ -469,9 +469,14 @@ pub const WindowsTty = struct {
0xc0 => '`',
0xdb => '[',
0xdc => '\\',
0xe2 => '\\',
0xdd => ']',
0xde => '\'',
else => return null,
else => {
const log = std.log.scoped(.vaxis);
log.warn("unknown wVirtualKeyCode: 0x{x}", .{event.wVirtualKeyCode});
return null;
},
};
if (std.unicode.utf16IsHighSurrogate(base_layout)) {