alsolovyev
@alsolovyev
¯\_(ツ)_/¯ Enjoy life, Eat well & Laugh often

Как заставить Alacritty корректно обрабатывать сочетания клавиш с fn?

В новой версии MacOS Sequoia появились горячие клавиши для управления окнами (fn + control + top|right|bottom|left), которые работают со всеми приложениями, кроме Alacritty (ранее использовал самописные shortcuts, не использующие fn). Однако при попытке переместить окно Alacritty влево (fn + control + left) вместо ожидаемого действия на экране появляется "[1;5H" (вправо — "[1;5F" и так далее). Не могу понять, как заставить Alacritty корректно обрабатывать эти сочетания клавиш. Возможно ли это исправить?

Лог событий при запуске без конфига (alacritty --config-file /dev/null --print-events)

[1.942925625s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 351361750 }, requested_resume: Some(Instant { tv_sec: 100472, tv_nsec: 356139625 }) })
[1.942945042s] [INFO ] [alacritty] winit event: AboutToWait
[1.948334417s] [INFO ] [alacritty] winit event: NewEvents(ResumeTimeReached { start: Instant { tv_sec: 100472, tv_nsec: 351412208 }, requested_resume: Instant { tv_sec: 100472, tv_nsec: 356139625 } })
[1.948390667s] [INFO ] [alacritty] winit event: AboutToWait
[1.948416709s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 356863375 }, requested_resume: None })
[1.948434250s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(5469621344))), payload: Frame })
[1.948446875s] [INFO ] [alacritty] winit event: AboutToWait
[1.948459834s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 356912458 }, requested_resume: None })
[1.948472000s] [INFO ] [alacritty] winit event: AboutToWait
[1.980238250s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 356936333 }, requested_resume: None })
[1.980724084s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(Home), logical_key: Named(Home), text: None, location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("\u{f729}"), key_without_modifiers: Named(Home) } }, is_synthetic: false } }
[1.980758000s] [INFO ] [alacritty] winit event: AboutToWait
[2.290964625s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 389230208 }, requested_resume: None })
[2.292146625s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(ControlLeft), logical_key: Named(Control), text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Control) } }, is_synthetic: false } }
[2.292244625s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) }
[2.292304709s] [INFO ] [alacritty] winit event: AboutToWait
[2.322188959s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 700824541 }, requested_resume: None })
[2.323157500s] [INFO ] [alacritty] winit event: AboutToWait
[3.150401042s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100472, tv_nsec: 731679375 }, requested_resume: None })
[3.151381792s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(ControlLeft), logical_key: Named(Control), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Control) } }, is_synthetic: false } }
[3.151444292s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: ModifiersChanged(Modifiers { state: ModifiersState(CONTROL), pressed_mods: ModifiersKeys(LCONTROL) }) }
[3.151537917s] [INFO ] [alacritty] winit event: AboutToWait
[3.185362167s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100473, tv_nsec: 560065250 }, requested_resume: None })
[3.186041125s] [INFO ] [alacritty] winit event: AboutToWait
[3.590465209s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100473, tv_nsec: 594547916 }, requested_resume: None })
[3.593502584s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(End), logical_key: Named(End), text: None, location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("\u{f72b}"), key_without_modifiers: Named(End) } }, is_synthetic: false } }
[3.593574167s] [INFO ] [alacritty] winit event: AboutToWait
[3.594025417s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100474, tv_nsec: 2073000 }, requested_resume: None })
[3.594088500s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(5469621344))), payload: Terminal(Wakeup) })
[3.594132542s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(5469621344))), payload: Terminal(Wakeup) })
[3.594166875s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(5469621344))), payload: Terminal(Wakeup) })
[3.594191542s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(5469621344))), payload: Terminal(Wakeup) })
[3.594224209s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: RedrawRequested }
[3.598391250s] [INFO ] [alacritty] winit event: AboutToWait
[3.598443209s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100474, tv_nsec: 6891458 }, requested_resume: None })
[3.598469584s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(5469621344))), payload: Frame })
[3.598494209s] [INFO ] [alacritty] winit event: AboutToWait
[3.711163209s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100474, tv_nsec: 6965166 }, requested_resume: None })
[3.712730417s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(End), logical_key: Named(End), text: None, location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("\u{f72b}"), key_without_modifiers: Named(End) } }, is_synthetic: false } }
[3.712823792s] [INFO ] [alacritty] winit event: AboutToWait
[3.982191875s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100474, tv_nsec: 121317625 }, requested_resume: None })
[3.983181000s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(ControlLeft), logical_key: Named(Control), text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Control) } }, is_synthetic: false } }
[3.983307084s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) }
[3.983365334s] [INFO ] [alacritty] winit event: AboutToWait
[3.993531084s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100474, tv_nsec: 391875166 }, requested_resume: None })
[3.994310334s] [INFO ] [alacritty] winit event: AboutToWait
[5.040251834s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100474, tv_nsec: 402823458 }, requested_resume: None })
[5.041902292s] [INFO ] [alacritty] winit event: AboutToWait
[5.528022250s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100475, tv_nsec: 450452708 }, requested_resume: None })
[5.529376167s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(SuperLeft), logical_key: Named(Super), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Super) } }, is_synthetic: false } }
[5.529483292s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5469621344)), event: ModifiersChanged(Modifiers { state: ModifiersState(SUPER), pressed_mods: ModifiersKeys(LSUPER) }) }
[5.529540959s] [INFO ] [alacritty] winit event: AboutToWait
[5.635159125s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 100475, tv_nsec: 938082875 }, requested_resume: None })
[5.642923375s] [INFO ] [alacritty] winit event: LoopExiting

  • Вопрос задан
  • 75 просмотров
Решения вопроса 1
alsolovyev
@alsolovyev Автор вопроса
¯\_(ツ)_/¯ Enjoy life, Eat well & Laugh often
Проблема в winit, которая отвечает за обработку окон.
Если кому интересно, то можно отслеживать состояние баг-реппорта на github тут и тут
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
22 нояб. 2024, в 12:20
10000 руб./за проект
22 нояб. 2024, в 11:53
3000 руб./за проект
22 нояб. 2024, в 11:51
20000 руб./за проект