detached 80c9df5

feat(ports): carry keycode and xkb modifier state in KeyEvent

commit
80c9df522793040937081246622c96efb17fe57d
author
brice · · 2026-09-23 15:40 UTC
parent
f8066e5
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +7 -0
M internal/ports/messages.go +7 -0
@@ -38,13 +38,20 @@ const (
3838 type InputEvent interface{ inputEvent() }
3939
4040 // KeyEvent carries input → core key transitions; Keysym is an xkb keysym name.
41+// Keycode is the evdev code (xkb keycode - 8) and State the xkb modifier state
42+// after this transition; wayland forwards both to clients unchanged.
4143 type KeyEvent struct {
4244 Keysym string
4345 Mods Mods
4446 Pressed bool
4547 TimeMsec uint32
48+ Keycode uint32
49+ State ModState
4650 }
4751
52+// ModState is the serialized xkb modifier state sent in wl_keyboard.modifiers.
53+type ModState struct{ Depressed, Latched, Locked, Group uint32 }
54+
4855 func (KeyEvent) inputEvent() {}
4956
5057 // OutputEvent carries output → core notifications.
@@ -38,13 +38,20 @@ const (
38 type InputEvent interface{ inputEvent() }38 type InputEvent interface{ inputEvent() }
39 39
40 // KeyEvent carries input → core key transitions; Keysym is an xkb keysym name.40 // KeyEvent carries input → core key transitions; Keysym is an xkb keysym name.
41+// Keycode is the evdev code (xkb keycode - 8) and State the xkb modifier state
42+// after this transition; wayland forwards both to clients unchanged.
41 type KeyEvent struct {43 type KeyEvent struct {
42 Keysym string44 Keysym string
43 Mods Mods45 Mods Mods
44 Pressed bool46 Pressed bool
45 TimeMsec uint3247 TimeMsec uint32
48+ Keycode uint32
49+ State ModState
46 }50 }
47 51
52+// ModState is the serialized xkb modifier state sent in wl_keyboard.modifiers.
53+type ModState struct{ Depressed, Latched, Locked, Group uint32 }
54+
48 func (KeyEvent) inputEvent() {}55 func (KeyEvent) inputEvent() {}
49 56
50 // OutputEvent carries output → core notifications.57 // OutputEvent carries output → core notifications.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 23

Tags 10

↑↓ moveenter openesc close