alacritty / alacritty

A cross-platform, OpenGL terminal emulator.
https://alacritty.org
Apache License 2.0
56.32k stars 3.02k forks source link

Cannot map Ctrl+Shift+Plus/Minus/Key0 #7253

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 1 year ago

System

OS: Linux 6.5.2-arch1-1 Version: alacritty 0.12.2 (9d9982df) Linux/BSD: X11

key_bindings:
  - key: Equals
    mods: Shift|Control
    action: IncreaseFontSize
  - key: Minus
    mods: Shift|Control
    action: DecreaseFontSize
  - key: Key0
    mods: Shift|Control
    action: ResetFontSize

Expected Behaviour

Press <C-S-+> will increase font size and <C-S-0> will reset font size and <C-S--> will decrease font size.

Actual Behaviour

Only get +, 0, -

Logs

Crashes: STDERR, STDOUT Font/Terminal size: alacritty -vv Keyboard and bindings: alacritty --print-events

$ alacritty -vv
Created log file at "/tmp/Alacritty-1015551.log"
[0.000000720s] [INFO ] [alacritty] Welcome to Alacritty
[0.000028970s] [INFO ] [alacritty] Version 0.12.2 (9d9982df)
[0.000033459s] [INFO ] [alacritty] Running on X11
[0.000355040s] [INFO ] [alacritty] Configuration files loaded from:
                                     "/home/wzy/.config/alacritty/alacritty.yml"
[0.009165685s] [INFO ] [alacritty] Using GLX 1.4
[0.009979819s] [INFO ] [alacritty] Window scale factor: 1.1666666666666667
[0.017869488s] [DEBUG] [alacritty] Loading "JetBrainsMono Nerd Font Mono" font
[0.026345412s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Regular, load_flags: TARGET_LIGHT, render_mode: "Lcd", lcd_filter: 1 }
[0.029248717s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold, load_flags: TARGET_LIGHT, render_mode: "Lcd", lcd_filter: 1 }
[0.032267657s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Italic, load_flags: TARGET_LIGHT, render_mode: "Lcd", lcd_filter: 1 }
[0.035314400s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Bold Italic, load_flags: TARGET_LIGHT, render_mode: "Lcd", lcd_filter: 1 }
[0.101686391s] [INFO ] [alacritty] Running on NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
[0.101707061s] [INFO ] [alacritty] Using OpenGL 3.3 renderer
[0.106641321s] [DEBUG] [alacritty] Filling glyph cache with common glyphs
[0.110353346s] [INFO ] [alacritty] Cell size: 11 x 26
[0.110362625s] [INFO ] [alacritty] Padding: 0 x 0
[0.110365631s] [INFO ] [alacritty] Width: 800, Height: 600
[0.127987712s] [INFO ] [alacritty] PTY dimensions: 23 x 72
[0.129705055s] [INFO ] [alacritty] Initialisation complete
[0.138756501s] [DEBUG] [alacritty_terminal] New num_cols is 261 and num_lines is 98
[0.144410446s] [INFO ] [alacritty] Padding: 0 x 0
[0.144421719s] [INFO ] [alacritty] Width: 2880, Height: 2560
[0.425688886s] [DEBUG] [crossfont] Loaded Face Face { ft_face: Font Face: Book, load_flags: TARGET_LIGHT, render_mode: "Lcd", lcd_filter: 1 }
[4.290907683s] [INFO ] [alacritty] Goodbye
Deleted log file at "/tmp/Alacritty-1015551.log"

$ alacritty --print-events
Created log file at "/tmp/Alacritty-1009486.log"
[0.000000798s] [INFO ] [alacritty] Welcome to Alacritty
[0.000029304s] [INFO ] [alacritty] Version 0.12.2 (9d9982df)
[0.000033070s] [INFO ] [alacritty] Running on X11
[0.000290368s] [INFO ] [alacritty] Configuration files loaded from:
                                     "/home/wzy/.config/alacritty/alacritty.yml"
[0.000914924s] [INFO ] [alacritty] winit event: NewEvents(Init)
[0.000923148s] [INFO ] [alacritty] winit event: Resumed
[0.008327458s] [INFO ] [alacritty] Using GLX 1.4
[0.036210628s] [INFO ] [alacritty] Window scale factor: 1.1666666666666667
[0.189112529s] [INFO ] [alacritty] Running on NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
[0.189132192s] [INFO ] [alacritty] Using OpenGL 3.3 renderer
[0.197716811s] [INFO ] [alacritty] Cell size: 11 x 26
[0.197728774s] [INFO ] [alacritty] Padding: 0 x 0
[0.197732967s] [INFO ] [alacritty] Width: 800, Height: 600
[0.208622343s] [INFO ] [alacritty] PTY dimensions: 23 x 72
[0.210461718s] [INFO ] [alacritty] Initialisation complete
[0.210546735s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 28, state: Released, virtual_keycode: Some(Return), modifiers: (empty) }) }
[0.210769332s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Ime(Disabled) }
[0.210845441s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Ime(Enabled) }
[0.210939207s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Resized(PhysicalSize { width: 800, height: 600 }) }
[0.210950020s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Moved(PhysicalPosition { x: 32, y: 0 }) }
[0.210967409s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Focused(false) }
[0.210976102s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Occluded(false) }
[0.211265555s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Focused(true) }
[0.211272985s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: CursorMoved { device_id: DeviceId(X(DeviceId(2))), position: PhysicalPosition { x: 616.0, y: 522.0 }, modifiers: (empty) } }
[0.212554050s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: CursorEntered { device_id: DeviceId(X(DeviceId(2))) } }
[0.212591917s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: CursorMoved { device_id: DeviceId(X(DeviceId(2))), position: PhysicalPosition { x: 616.0, y: 522.0 }, modifiers: (empty) } }
[0.212604897s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Resized(PhysicalSize { width: 2880, height: 2560 }) }
[0.212610044s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Occluded(false) }
[0.212614662s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Occluded(false) }
[0.212672515s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Moved(PhysicalPosition { x: 0, y: 0 }) }
[0.212682843s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Terminal(CursorBlinkingChange) })
[0.212689626s] [INFO ] [alacritty] winit event: MainEventsCleared
[0.212693330s] [INFO ] [alacritty] winit event: RedrawRequested(WindowId(WindowId(58720258)))
[0.212697388s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[0.218288041s] [INFO ] [alacritty] Padding: 0 x 0
[0.218300665s] [INFO ] [alacritty] Width: 2880, Height: 2560
[0.229248180s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241609, tv_nsec: 777083465 }, requested_resume: Some(Instant { tv_sec: 241609, tv_nsec: 793761944 }) })
[0.229274601s] [INFO ] [alacritty] winit event: MainEventsCleared
[0.962726232s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[0.962733615s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 510576517 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 260573246 }) })
[0.962737996s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: BlinkCursor })
[0.962744092s] [INFO ] [alacritty] winit event: MainEventsCleared
[0.962746662s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[0.963824198s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 511664671 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 260573246 }) })
[0.963836874s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Frame })
[0.963842266s] [INFO ] [alacritty] winit event: MainEventsCleared
[0.963845430s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[0.963850113s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 511692390 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 260573246 }) })
[0.963854812s] [INFO ] [alacritty] winit event: MainEventsCleared
[0.963859225s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.208518782s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 511705925 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 260573246 }) })
[1.208583558s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 13, state: Pressed, virtual_keycode: Some(Equals), modifiers: SHIFT | CTRL }) }
[1.208613930s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 13, state: Pressed, virtual_keycode: Some(Plus), modifiers: SHIFT | CTRL }, is_synthetic: false } }
[1.208630698s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: ReceivedCharacter('+') }
[1.208641906s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.208647949s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.210257940s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 758096772 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.210278089s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Frame })
[1.210287113s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.210292208s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.210300520s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 758141284 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.210309185s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.210314880s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.212706350s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 758164720 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.212739376s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Terminal(Wakeup) })
[1.212752154s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.212759983s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.215976024s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 763813202 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.216004744s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Frame })
[1.216016715s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.216024138s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.216034819s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 763875220 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.216046265s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.216052593s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.472564993s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241610, tv_nsec: 763902507 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.472642211s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 13, state: Released, virtual_keycode: Some(Equals), modifiers: SHIFT | CTRL }) }
[1.472670540s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 13, state: Released, virtual_keycode: Some(Plus), modifiers: SHIFT | CTRL }, is_synthetic: false } }
[1.472692998s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.472701356s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.958273477s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 20554022 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.958374913s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.958395718s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.958430402s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 506264022 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.958483123s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.958505647s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.958536109s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 506371410 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.958572100s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.958595232s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.958621902s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 506458400 }, requested_resume: Some(Instant { tv_sec: 241611, tv_nsec: 506502156 }) })
[1.958658845s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.958680679s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.958716837s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 506552528 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[1.958756942s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: BlinkCursor })
[1.958792483s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.958812399s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.962866714s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 510698509 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[1.962920866s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Frame })
[1.962943600s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.962957046s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[1.962981212s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 510815197 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[1.963021670s] [INFO ] [alacritty] winit event: MainEventsCleared
[1.963042253s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.416655825s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 510904491 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.416811007s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 58, state: Released, virtual_keycode: Some(RControl), modifiers: SHIFT | CTRL }) }
[2.416878378s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: ModifiersChanged(SHIFT) }
[2.416929352s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 58, state: Released, virtual_keycode: Some(RControl), modifiers: SHIFT }, is_synthetic: false } }
[2.416988536s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.417018853s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.496535654s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241611, tv_nsec: 966310016 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.496613385s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: SHIFT }) }
[2.496661363s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: ModifiersChanged((empty)) }
[2.496689016s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: (empty) }, is_synthetic: false } }
[2.496717660s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.496736907s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708566887s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 45185965 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708599400s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708603963s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708609719s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256451442 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708613878s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708616058s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708618875s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256461968 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708622624s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708624712s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708627510s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256470601 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708632793s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708635315s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708655132s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256498075 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708659421s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708661929s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708665099s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256508140 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708669240s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708671883s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708675123s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256518162 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708679224s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708681790s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708684666s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256527723 }, requested_resume: Some(Instant { tv_sec: 241612, tv_nsec: 256544454 }) })
[2.708688732s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708691227s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.708711842s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 256554746 }, requested_resume: Some(Instant { tv_sec: 241613, tv_nsec: 6552257 }) })
[2.708716382s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: BlinkCursor })
[2.708722179s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.708724574s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.709850045s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 257691223 }, requested_resume: Some(Instant { tv_sec: 241613, tv_nsec: 6552257 }) })
[2.709860888s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Frame })
[2.709865273s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.709868109s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.709872548s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 257714802 }, requested_resume: Some(Instant { tv_sec: 241613, tv_nsec: 6552257 }) })
[2.709877392s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.709881366s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[2.984646793s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 257727848 }, requested_resume: Some(Instant { tv_sec: 241613, tv_nsec: 6552257 }) })
[2.984888797s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 125, state: Pressed, virtual_keycode: None, modifiers: (empty) }) }
[2.984950171s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: ModifiersChanged(LOGO) }
[2.985000631s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 125, state: Pressed, virtual_keycode: None, modifiers: LOGO }, is_synthetic: false } }
[2.985118538s] [INFO ] [alacritty] winit event: MainEventsCleared
[2.985151873s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[3.080590129s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 534256928 }, requested_resume: Some(Instant { tv_sec: 241613, tv_nsec: 6552257 }) })
[3.080693652s] [INFO ] [alacritty] winit event: DeviceEvent { device_id: DeviceId(X(DeviceId(13))), event: Key(KeyboardInput { scancode: 16, state: Pressed, virtual_keycode: Some(Q), modifiers: LOGO }) }
[3.082066783s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 16, state: Released, virtual_keycode: Some(Q), modifiers: LOGO }, is_synthetic: true } }
[3.082131535s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 125, state: Released, virtual_keycode: None, modifiers: LOGO }, is_synthetic: true } }
[3.082155201s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: ModifiersChanged((empty)) }
[3.082173027s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: Focused(false) }
[3.082194655s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(58720258)), event: CloseRequested }
[3.082251180s] [INFO ] [alacritty] winit event: MainEventsCleared
[3.082268997s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[3.086644444s] [INFO ] [alacritty] winit event: NewEvents(WaitCancelled { start: Instant { tv_sec: 241612, tv_nsec: 634475588 }, requested_resume: None })
[3.086699158s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Terminal(Exit) })
[3.089374214s] [INFO ] [alacritty] winit event: UserEvent(Event { window_id: Some(WindowId(WindowId(58720258))), payload: Frame })
[3.089386076s] [INFO ] [alacritty] winit event: MainEventsCleared
[3.089389222s] [INFO ] [alacritty] winit event: RedrawEventsCleared
[3.089391716s] [INFO ] [alacritty] winit event: LoopDestroyed
[3.090688767s] [INFO ] [alacritty] Goodbye
Deleted log file at "/tmp/Alacritty-1009486.log"
kchibisov commented 1 year ago

Press <C-S-+> will increase font size and will reset font size and will decrease font size.

You can bind the keys like that if you want, but we don't use such bindings by default. Consult our bindings if you want to know how to change the font size.

Freed-Wu commented 1 year ago

I refer https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty-bindings.5.scd and try:

key_bindings:
  - key: Equals
    mods: Shift|Control
    action: IncreaseFontSize
  - key: Minus
    mods: Shift|Control
    action: DecreaseFontSize
  - key: Key0
    mods: Shift|Control
    action: ResetFontSize

However, it doesn't work. Seem to be <C-S-X> (X is +, -, 0) cannot be mapped?

kchibisov commented 1 year ago

because Shift changes key. You can look at --print-events to figure out how to bind those keys.

Freed-Wu commented 1 year ago

You can look at --print-events to figure out how to bind those keys.

I found this:

[10.285567884s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94663214702720)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 13, state: Pressed, virtual_keycode: Some(Plus), modifiers: SHIFT | CTRL }, is_synthetic: false } }

I notice virtual_keycode: Some(Plus), So I got this can work:

key_bindings:
  - key: Plus
    mods: Shift|Control
    action: IncreaseFontSize
  - key: Underline
    mods: Shift|Control
    action: DecreaseFontSize

However, about <C-S-0>, It is:

[8.930779429s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 41, state: Released, virtual_keycode: Some(Grave), modifiers: (empty) }, is_synthetic: false } }
[10.162123109s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 42, state: Pressed, virtual_keycode: Some(LShift), modifiers: (empty) }, is_synthetic: false } }
[10.284540319s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 58, state: Pressed, virtual_keycode: None, modifiers: SHIFT }, is_synthetic: false } }
[10.591262219s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 11, state: Pressed, virtual_keycode: None, modifiers: SHIFT | CTRL }, is_synthetic: false } }
[10.831094352s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 11, state: Released, virtual_keycode: None, modifiers: SHIFT | CTRL }, is_synthetic: false } }
[10.841783762s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 58, state: Released, virtual_keycode: None, modifiers: SHIFT | CTRL }, is_synthetic: false } }
[10.922230720s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: SHIFT }, is_synthetic: false } }
[11.419774021s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(94000307693376)), event: KeyboardInput { device_id: DeviceId(Wayland(DeviceId)), input: KeyboardInput { scancode: 56, state: Pressed, virtual_keycode: Some(LAlt), modifiers: (empty) }, is_synthetic: false } }

I cannot know virtual_keycode: None is what key?

kchibisov commented 1 year ago

In such cases you bind by scancode.

So key: 58 or key: 11?

Freed-Wu commented 1 year ago

Yes, it is key: 11. Thanks!