Added support for the additional key of ISO keyboards (aka 102-key keyboards) named FL_Iso_Key.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2012-03-26 16:54:54 +00:00
parent 08ce2e07d3
commit 0b6f546b0f
6 changed files with 12 additions and 3 deletions

View File

@ -337,6 +337,7 @@ enum Fl_When { // Fl_Widget::when():
#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.

View File

@ -637,7 +637,7 @@ public:
\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,

View File

@ -159,6 +159,11 @@ enum {
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 @@ static const struct {unsigned short vk, fltk;} vktab[] = {
{ 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 },*/

View File

@ -64,6 +64,7 @@ static const struct {unsigned short vk, fltk;} vktab[] = {
{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},

View File

@ -766,7 +766,8 @@ static const struct {unsigned short vk, fltk, extended;} vktab[] = {
{0xdb, '['},
{0xdc, '\\'},
{0xdd, ']'},
{0xde, '\''}
{0xde, '\''},
{VK_OEM_102, FL_Iso_Key}
};
static int ms2fltk(int vk, int extended) {
static unsigned short vklut[256];

View File

@ -63,6 +63,7 @@ struct keycode_table{int n; const char* text;} table[] = {
{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"},