Skip to content

Commit 5e9556e

Browse files
committed
Add missing methods descriptions
* adjust package comments to match golint
1 parent 56ae3d9 commit 5e9556e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shiny/driver/internal/x11key/x11key.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
//go:generate go run gen.go
66

7-
// x11key contains X11 numeric codes for the keyboard and mouse.
7+
// Package x11key contains X11 numeric codes for the keyboard and mouse.
88
package x11key // import "golang.org/x/exp/shiny/driver/internal/x11key"
99

1010
import (
@@ -30,12 +30,14 @@ const (
3030
Button5Mask = 1 << 12
3131
)
3232

33+
// KeysymTable holds current table of keyboard keys mapped to Xkb keysyms & current special modifiers bits
3334
type KeysymTable struct {
3435
Table [256][6]uint32
3536

3637
NumLockMod, ModeSwitchMod, ISOLevel3ShiftMod uint16
3738
}
3839

40+
// Lookup converts Xkb xproto keycode (detail) & mod (state) into mobile/event/key Rune & Code
3941
func (t *KeysymTable) Lookup(detail uint8, state uint16) (rune, key.Code) {
4042
te := t.Table[detail][0:2]
4143
if state&t.ModeSwitchMod != 0 {
@@ -86,6 +88,7 @@ func isKeypad(keysym uint32) bool {
8688
return keysym >= 0xff80 && keysym <= 0xffbd
8789
}
8890

91+
// KeyModifiers returns mobile/event/key modifiers type from xproto mod state
8992
func KeyModifiers(state uint16) (m key.Modifiers) {
9093
if state&ShiftMask != 0 {
9194
m |= key.ModShift

0 commit comments

Comments
 (0)