Bug 855975 part.22 Move sModifierKeyMap from nsWindowDefs.h to KeyboardLayout.h r=jimm

This commit is contained in:
Masayuki Nakano 2013-05-29 15:34:49 +09:00
parent 04f15faf88
commit a0dfbbe736
3 changed files with 12 additions and 11 deletions

View File

@ -41,6 +41,17 @@ struct nsModifierKeyState;
namespace mozilla {
namespace widget {
static const uint32_t sModifierKeyMap[][3] = {
{ nsIWidget::CAPS_LOCK, VK_CAPITAL, 0 },
{ nsIWidget::NUM_LOCK, VK_NUMLOCK, 0 },
{ nsIWidget::SHIFT_L, VK_SHIFT, VK_LSHIFT },
{ nsIWidget::SHIFT_R, VK_SHIFT, VK_RSHIFT },
{ nsIWidget::CTRL_L, VK_CONTROL, VK_LCONTROL },
{ nsIWidget::CTRL_R, VK_CONTROL, VK_RCONTROL },
{ nsIWidget::ALT_L, VK_MENU, VK_LMENU },
{ nsIWidget::ALT_R, VK_MENU, VK_RMENU }
};
class KeyboardLayout;
class ModifierKeyState {

View File

@ -7,6 +7,7 @@
#include "WinUtils.h"
#include "nsWindow.h"
#include "nsWindowDefs.h"
#include "KeyboardLayout.h"
#include "nsGUIEvent.h"
#include "nsIDOMMouseEvent.h"
#include "mozilla/Preferences.h"

View File

@ -197,17 +197,6 @@ const char kClassNameDialog[] = "MozillaDialogClass";
const char kClassNameDropShadow[] = "MozillaDropShadowWindowClass";
const char kClassNameTemp[] = "MozillaTempWindowClass";
static const uint32_t sModifierKeyMap[][3] = {
{ nsIWidget::CAPS_LOCK, VK_CAPITAL, 0 },
{ nsIWidget::NUM_LOCK, VK_NUMLOCK, 0 },
{ nsIWidget::SHIFT_L, VK_SHIFT, VK_LSHIFT },
{ nsIWidget::SHIFT_R, VK_SHIFT, VK_RSHIFT },
{ nsIWidget::CTRL_L, VK_CONTROL, VK_LCONTROL },
{ nsIWidget::CTRL_R, VK_CONTROL, VK_RCONTROL },
{ nsIWidget::ALT_L, VK_MENU, VK_LMENU },
{ nsIWidget::ALT_R, VK_MENU, VK_RMENU }
};
/**************************************************************
*
* SECTION: structs