MCPcopy Create free account
hub / github.com/efogdev/mpris-timer / GdkKeyvals

Method GdkKeyvals

internal/core/kbd.go:23–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21)
22
23func (k Key) GdkKeyvals() []uint {
24 switch k {
25 case KeyEnter:
26 return []uint{gdk.KEY_Return, gdk.KEY_KP_Enter, gdk.KEY_ISO_Enter, gdk.KEY_3270_Enter, gdk.KEY_RockerEnter}
27 case KeySpace:
28 return []uint{gdk.KEY_KP_Space, gdk.KEY_space}
29 case KeyLeft:
30 return []uint{gdk.KEY_KP_Left, gdk.KEY_Left}
31 case KeyRight:
32 return []uint{gdk.KEY_KP_Right, gdk.KEY_Right}
33 case KeyUp:
34 return []uint{gdk.KEY_KP_Up, gdk.KEY_Up}
35 case KeyDown:
36 return []uint{gdk.KEY_KP_Down, gdk.KEY_Down}
37 case KeyEsc:
38 return []uint{gdk.KEY_Escape}
39 case KeyQ:
40 return []uint{gdk.KEY_Q, gdk.KEY_q}
41 case KeyW:
42 return []uint{gdk.KEY_W, gdk.KEY_w}
43 case KeyD:
44 return []uint{gdk.KEY_D, gdk.KEY_d}
45 default:
46 panic("unknown key")
47 }
48}
49
50func ParseKeyval(keyval uint) string {
51 return strings.ReplaceAll(gdk.KeyvalName(keyval), "KP_", "")

Callers 6

setupTimeEntryFunction · 0.80
NewPrefsWindowFunction · 0.80
RenderPresetsFunction · 0.80
NewTimePickerFunction · 0.80
NewSidebarFunction · 0.80
NewContentFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected