input, macos: initial work on keymapper and macos usage of it

This commit is contained in:
Mitchell Hashimoto
2023-08-08 10:49:01 -07:00
parent a042b5db9c
commit 3d23f26326
9 changed files with 808 additions and 1 deletions

View File

@@ -360,6 +360,8 @@ extension Ghostty {
guard let surface = self.surface else { return }
let mods = Self.translateFlags(event.modifierFlags)
let unmapped_key = Self.keycodes[event.keyCode] ?? GHOSTTY_KEY_INVALID
ghostty_surface_key2(surface, action, UInt32(event.keyCode), mods)
// We translate the key to the localized keyboard layout. However, we only support
// ASCII characters to make our translation easier across platforms. This is something