add more Mac function keys

This commit is contained in:
David Rose 2006-10-30 16:22:59 +00:00
parent 0341696500
commit bf9d66662b
3 changed files with 25 additions and 6 deletions

View File

@ -1155,7 +1155,7 @@ void handleWindowDMEvent (void *userData, short theMessage, void *notifyData)
OSStatus osxGraphicsWindow::handleKeyInput (EventHandlerCallRef myHandler, EventRef event, Boolean keyDown) {
OSStatus result = eventNotHandledErr;
if (osxdisplay_cat.is_spam()) {
if (osxdisplay_cat.is_debug()) {
UInt32 keyCode;
GetEventParameter (event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
@ -1410,11 +1410,15 @@ void osxGraphicsWindow::SystemSetWindowForground(bool forground)
case 97: nk = KeyboardButton::f6(); break;
case 98: nk = KeyboardButton::f7(); break;
case 100: nk = KeyboardButton::f8(); break;
// case : nk = KeyboardButton::f9(); break; // seem to be used by the systems..
// case : nk = KeyboardButton::f10(); break;
// case : nk = KeyboardButton::f11(); break;
// case : nk = KeyboardButton::f12(); break;
// case 105: nk = KeyboardButton::f13(); break; // panda does not have a 13
case 101: nk = KeyboardButton::f9(); break;
case 109: nk = KeyboardButton::f10(); break;
case 103: nk = KeyboardButton::f11(); break;
case 111: nk = KeyboardButton::f12(); break;
case 105: nk = KeyboardButton::f13(); break;
case 107: nk = KeyboardButton::f14(); break;
case 113: nk = KeyboardButton::f15(); break;
case 106: nk = KeyboardButton::f16(); break;
// shiftable chartablet
case 50: nk = KeyboardButton::ascii_key('`'); break;

View File

@ -72,6 +72,10 @@ DEFINE_KEYBD_BUTTON_HANDLE(f9)
DEFINE_KEYBD_BUTTON_HANDLE(f10)
DEFINE_KEYBD_BUTTON_HANDLE(f11)
DEFINE_KEYBD_BUTTON_HANDLE(f12)
DEFINE_KEYBD_BUTTON_HANDLE(f13)
DEFINE_KEYBD_BUTTON_HANDLE(f14)
DEFINE_KEYBD_BUTTON_HANDLE(f15)
DEFINE_KEYBD_BUTTON_HANDLE(f16)
DEFINE_KEYBD_BUTTON_HANDLE(left)
DEFINE_KEYBD_BUTTON_HANDLE(right)
DEFINE_KEYBD_BUTTON_HANDLE(up)
@ -134,6 +138,11 @@ init_keyboard_buttons() {
ButtonRegistry::ptr()->register_button(_f11, "f11");
ButtonRegistry::ptr()->register_button(_f12, "f12");
ButtonRegistry::ptr()->register_button(_f13, "f13");
ButtonRegistry::ptr()->register_button(_f14, "f14");
ButtonRegistry::ptr()->register_button(_f15, "f15");
ButtonRegistry::ptr()->register_button(_f16, "f16");
ButtonRegistry::ptr()->register_button(_left, "arrow_left");
ButtonRegistry::ptr()->register_button(_right, "arrow_right");
ButtonRegistry::ptr()->register_button(_up, "arrow_up"); // cannot name this 'up' since it conflicts with key-release name 'up'

View File

@ -53,6 +53,12 @@ PUBLISHED:
static ButtonHandle f11();
static ButtonHandle f12();
// PC keyboards don't have these four buttons, but Macs do.
static ButtonHandle f13();
static ButtonHandle f14();
static ButtonHandle f15();
static ButtonHandle f16();
static ButtonHandle left();
static ButtonHandle right();
static ButtonHandle up();