зеркало из https://github.com/mozilla/pjs.git
Mac only: added 'isCommand' in nsInputEvent
This commit is contained in:
Родитель
9217bf329b
Коммит
3a4a6cba6f
|
@ -106,6 +106,12 @@ struct nsInputEvent : public nsGUIEvent {
|
|||
PRBool isControl;
|
||||
/// PR_TRUE indicates the alt key in down
|
||||
PRBool isAlt;
|
||||
#ifdef XP_MAC
|
||||
/// PR_TRUE indicates the command key in down
|
||||
/// For now, it's only used in Widget: not for export
|
||||
/// in nsIDOMEvent.h or nsJSEvent.cpp (later maybe)
|
||||
PRBool isCommand;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -199,6 +199,7 @@ PRBool nsMacEventHandler::HandleKeyEvent(EventRecord& aOSEvent)
|
|||
keyEvent.isShift = ((aOSEvent.modifiers & shiftKey) != 0);
|
||||
keyEvent.isControl = ((aOSEvent.modifiers & controlKey) != 0);
|
||||
keyEvent.isAlt = ((aOSEvent.modifiers & optionKey) != 0);
|
||||
keyEvent.isCommand = ((aOSEvent.modifiers & cmdKey) != 0);
|
||||
|
||||
// nsKeyEvent
|
||||
keyEvent.keyCode = (aOSEvent.message & charCodeMask); //¥TODO: do special keys conversions for NS_VK_F1 etc...
|
||||
|
|
Загрузка…
Ссылка в новой задаче