Skip to content

Commit

Permalink
all: explicit typing for modifier constants
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Feb 27, 2021
1 parent 1d76324 commit 9d62782
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions hotkey_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ type Modifier uint32

// All kinds of Modifiers
const (
ModCtrl = 0x1000
ModShift = 0x200
ModOption = 0x800
ModCmd = 0x100
ModCtrl Modifier = 0x1000
ModShift Modifier = 0x200
ModOption Modifier = 0x800
ModCmd Modifier = 0x100
)

// Key represents a key.
Expand Down
14 changes: 7 additions & 7 deletions hotkey_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ type Modifier uint32
// All kinds of Modifiers
// See /usr/include/X11/X.h
const (
ModCtrl = (1 << 2)
ModShift = (1 << 0)
Mod1 = (1 << 3)
Mod2 = (1 << 4)
Mod3 = (1 << 5)
Mod4 = (1 << 6)
Mod5 = (1 << 7)
ModCtrl Modifier = (1 << 2)
ModShift Modifier = (1 << 0)
Mod1 Modifier = (1 << 3)
Mod2 Modifier = (1 << 4)
Mod3 Modifier = (1 << 5)
Mod4 Modifier = (1 << 6)
Mod5 Modifier = (1 << 7)
)

// Key represents a key.
Expand Down

0 comments on commit 9d62782

Please sign in to comment.