io/key: add support for the Tab and Space keys

Fixes gio#62

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-09 11:17:36 +01:00
parent da42412e56
commit de7d6b28fa
6 changed files with 23 additions and 0 deletions
+6
View File
@@ -110,6 +110,8 @@ const (
_VK_PRIOR = 0x21
_VK_RIGHT = 0x27
_VK_RETURN = 0x0d
_VK_SPACE = 0x20
_VK_TAB = 0x09
_VK_UP = 0x26
_VK_F1 = 0x70
@@ -524,6 +526,10 @@ func convertKeyCode(code uintptr) (string, bool) {
r = "F11"
case _VK_F12:
r = "F12"
case _VK_TAB:
r = key.NameTab
case _VK_SPACE:
r = "Space"
default:
return "", false
}