mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
apprt/embedded: handle repeat events
This commit is contained in:
@ -367,7 +367,7 @@ extension Ghostty {
|
||||
private func keyAction(_ action: ghostty_input_action_e, event: NSEvent) {
|
||||
guard let surface = self.surface else { return }
|
||||
let mods = Self.translateFlags(event.modifierFlags)
|
||||
ghostty_surface_key2(surface, action, UInt32(event.keyCode), mods)
|
||||
ghostty_surface_key(surface, action, UInt32(event.keyCode), mods)
|
||||
}
|
||||
|
||||
// MARK: Menu Handlers
|
||||
|
@ -387,7 +387,8 @@ pub const Surface = struct {
|
||||
keycode: u32,
|
||||
mods: input.Mods,
|
||||
) !void {
|
||||
if (action != .press) return;
|
||||
// We don't handle release events because we don't use them yet.
|
||||
if (action != .press and action != .repeat) return;
|
||||
|
||||
// Translate our key using the keymap for our localized keyboard layout.
|
||||
var buf: [128]u8 = undefined;
|
||||
|
Reference in New Issue
Block a user