io/key: switch Event.Name to be a string and add function keys

Function keys don't have a natural rune representation so switch
Event.Name to be a string to fit "F1"-"F12".

Fixes gio#59

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-08 19:00:43 +01:00
parent c833c98fd7
commit cc43588aba
8 changed files with 169 additions and 59 deletions
+1 -1
View File
@@ -205,7 +205,7 @@ func (w *window) SetAnimating(anim bool) {
C.gio_setAnimating(w.view, animi)
}
func (w *window) onKeyCommand(name rune) {
func (w *window) onKeyCommand(name string) {
w.w.Event(key.Event{
Name: name,
})