From 5190c7c7637eada7e4a1aeaa6be4db3989524396 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 29 Mar 2014 13:09:27 -0400 Subject: Finished re-adding the numeric keypad keys and fixing up the GTK+ Area implementation to handle the new KeyEvent. Everything seems to work on this end... --- area_unix.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'area_unix.go') diff --git a/area_unix.go b/area_unix.go index 9e1370d..08dd48d 100644 --- a/area_unix.go +++ b/area_unix.go @@ -281,8 +281,12 @@ var extkeys = map[C.guint]ExtKey{ C.GDK_KEY_F10: F10, C.GDK_KEY_F11: F11, C.GDK_KEY_F12: F12, - // numpad numeric keys are handled in events_notdarwin.go + // numpad numeric keys and . are handled in events_notdarwin.go C.GDK_KEY_KP_Enter: NEnter, + C.GDK_KEY_KP_Add: NAdd, + C.GDK_KEY_KP_Subtract: NSubtract, + C.GDK_KEY_KP_Multiply: NMultiply, + C.GDK_KEY_KP_Divide: NDivide, } // sanity check @@ -292,7 +296,10 @@ func init() { included[v] = true } for i := 1; i < int(_nextkeys); i++ { - if i >= int(_N0) && i <= int(_N9) { // skip numpad numbers + if i >= int(N0) && i <= int(N9) { // skip numpad numbers and . + continue + } + if i == int(NDot) { continue } if !included[i] { -- cgit v1.2.3