Author: manolo
Date: 2012-03-26 09:54:54 -0700 (Mon, 26 Mar 2012)
New Revision: 9303
Log:
Added support for the additional key of ISO keyboards (aka 102-key keyboards)
named FL_Iso_Key.
Modified:
branches/branch-1.3/FL/Enumerations.H
branches/branch-1.3/FL/Fl.H
branches/branch-1.3/src/Fl_get_key_mac.cxx
branches/branch-1.3/src/Fl_get_key_win32.cxx
branches/branch-1.3/src/Fl_win32.cxx
branches/branch-1.3/test/keyboard.cxx
Modified: branches/branch-1.3/FL/Enumerations.H
===================================================================
--- branches/branch-1.3/FL/Enumerations.H 2012-03-26 10:20:53 UTC (rev
9302)
+++ branches/branch-1.3/FL/Enumerations.H 2012-03-26 16:54:54 UTC (rev
9303)
@@ -337,6 +337,7 @@
#define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for
mouse button n.
#define FL_BackSpace 0xff08 ///< The backspace key.
#define FL_Tab 0xff09 ///< The tab key.
+#define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards.
#define FL_Enter 0xff0d ///< The enter key.
#define FL_Pause 0xff13 ///< The pause key.
#define FL_Scroll_Lock 0xff14 ///< The scroll lock key.
Modified: branches/branch-1.3/FL/Fl.H
===================================================================
--- branches/branch-1.3/FL/Fl.H 2012-03-26 10:20:53 UTC (rev 9302)
+++ branches/branch-1.3/FL/Fl.H 2012-03-26 16:54:54 UTC (rev 9303)
@@ -637,7 +637,7 @@
\li All other keys on the keypad have a symbol: FL_Escape,
FL_BackSpace, FL_Tab, FL_Enter, FL_Print, FL_Scroll_Lock, FL_Pause,
FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down,
- FL_Left, FL_Up, FL_Right, FL_Down, FL_Shift_L, FL_Shift_R,
+ FL_Left, FL_Up, FL_Right, FL_Down, FL_Iso_Key, FL_Shift_L, FL_Shift_R,
FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R,
FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter. Be
careful not to confuse these with the very similar, but all-caps,
Modified: branches/branch-1.3/src/Fl_get_key_mac.cxx
===================================================================
--- branches/branch-1.3/src/Fl_get_key_mac.cxx 2012-03-26 10:20:53 UTC (rev
9302)
+++ branches/branch-1.3/src/Fl_get_key_mac.cxx 2012-03-26 16:54:54 UTC (rev
9303)
@@ -159,6 +159,11 @@
kVK_UpArrow = 0x7E
};
+/* ISO keyboards only*/
+enum {
+ kVK_ISO_Section = 0x0A
+};
+
#endif
// convert an FLTK (X) keysym to a MacOS symbol:
@@ -176,7 +181,7 @@
{ kVK_ANSI_U, 'U' }, { kVK_ANSI_V, 'V' }, { kVK_ANSI_W, 'W' }, { kVK_ANSI_X,
'X' },
{ kVK_ANSI_Y, 'Y' }, { kVK_ANSI_Z, 'Z' },
{ kVK_ANSI_LeftBracket, '[' }, { kVK_ANSI_Backslash, '\\' }, {
kVK_ANSI_RightBracket, ']' }, { kVK_ANSI_Grave, '`' },
- { kVK_Delete, FL_BackSpace }, { kVK_Tab, FL_Tab }, { kVK_Return, FL_Enter },
/*{ 0x7F, FL_Pause },
+ { kVK_Delete, FL_BackSpace }, { kVK_Tab, FL_Tab }, { kVK_ISO_Section,
FL_Iso_Key }, { kVK_Return, FL_Enter }, /*{ 0x7F, FL_Pause },
{ 0x7F, FL_Scroll_Lock },*/ { kVK_Escape, FL_Escape }, { kVK_Home, FL_Home
}, { kVK_LeftArrow, FL_Left },
{ kVK_UpArrow, FL_Up }, { kVK_RightArrow, FL_Right }, { kVK_DownArrow,
FL_Down }, { kVK_PageUp, FL_Page_Up },
{ kVK_PageDown, FL_Page_Down }, { kVK_End, FL_End }, /*{ 0x7F, FL_Print },
{ 0x7F, FL_Insert },*/
Modified: branches/branch-1.3/src/Fl_get_key_win32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_get_key_win32.cxx 2012-03-26 10:20:53 UTC
(rev 9302)
+++ branches/branch-1.3/src/Fl_get_key_win32.cxx 2012-03-26 16:54:54 UTC
(rev 9303)
@@ -64,6 +64,7 @@
{VK_BACK, FL_BackSpace},
{VK_TAB, FL_Tab},
{VK_CLEAR, 0xff0b/*XK_Clear*/},
+ {0xe2 /*VK_OEM_102*/, FL_Iso_Key},
{VK_RETURN, FL_Enter},
{VK_PAUSE, FL_Pause},
{VK_SCROLL, FL_Scroll_Lock},
Modified: branches/branch-1.3/src/Fl_win32.cxx
===================================================================
--- branches/branch-1.3/src/Fl_win32.cxx 2012-03-26 10:20:53 UTC (rev
9302)
+++ branches/branch-1.3/src/Fl_win32.cxx 2012-03-26 16:54:54 UTC (rev
9303)
@@ -766,7 +766,8 @@
{0xdb, '['},
{0xdc, '\\'},
{0xdd, ']'},
- {0xde, '\''}
+ {0xde, '\''},
+ {VK_OEM_102, FL_Iso_Key}
};
static int ms2fltk(int vk, int extended) {
static unsigned short vklut[256];
Modified: branches/branch-1.3/test/keyboard.cxx
===================================================================
--- branches/branch-1.3/test/keyboard.cxx 2012-03-26 10:20:53 UTC (rev
9302)
+++ branches/branch-1.3/test/keyboard.cxx 2012-03-26 16:54:54 UTC (rev
9303)
@@ -63,6 +63,7 @@
{FL_Escape, "FL_Escape"},
{FL_BackSpace, "FL_BackSpace"},
{FL_Tab, "FL_Tab"},
+ {FL_Iso_Key, "FL_Iso_Key"},
{FL_Enter, "FL_Enter"},
{FL_Print, "FL_Print"},
{FL_Scroll_Lock, "FL_Scroll_Lock"},
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit