From 9d6278286385de9a44a0495c937c63c6fde2884f Mon Sep 17 00:00:00 2001 From: Changkun Ou Date: Sat, 27 Feb 2021 12:19:49 +0100 Subject: [PATCH] all: explicit typing for modifier constants --- hotkey_darwin.go | 8 ++++---- hotkey_linux.go | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hotkey_darwin.go b/hotkey_darwin.go index 858f196..95daa80 100644 --- a/hotkey_darwin.go +++ b/hotkey_darwin.go @@ -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. diff --git a/hotkey_linux.go b/hotkey_linux.go index a67d3f2..8bc1913 100644 --- a/hotkey_linux.go +++ b/hotkey_linux.go @@ -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.