diff options
-rw-r--r-- | widget/CompositorWidget.h | 9 | ||||
-rw-r--r-- | widget/EventMessageList.h | 3 | ||||
-rw-r--r-- | widget/GfxDriverInfo.h | 7 | ||||
-rw-r--r-- | widget/GfxInfoBase.cpp | 6 | ||||
-rw-r--r-- | widget/InProcessCompositorWidget.cpp | 8 | ||||
-rw-r--r-- | widget/NativeKeyToDOMCodeName.h | 169 | ||||
-rw-r--r-- | widget/NativeKeyToDOMKeyName.h | 110 | ||||
-rw-r--r-- | widget/nsIWidget.h | 5 | ||||
-rw-r--r-- | widget/nsIdleService.cpp | 111 |
9 files changed, 12 insertions, 416 deletions
diff --git a/widget/CompositorWidget.h b/widget/CompositorWidget.h index 93269eac6..eb657ba7f 100644 --- a/widget/CompositorWidget.h +++ b/widget/CompositorWidget.h @@ -30,7 +30,6 @@ namespace widget { class WinCompositorWidget; class X11CompositorWidget; -class AndroidCompositorWidget; class CompositorWidgetInitData; // Gecko widgets usually need to communicate with the CompositorWidget with @@ -56,12 +55,9 @@ class CompositorWidgetChild; class WidgetRenderingContext { public: -#if defined(XP_MACOSX) +#ifdef XP_MACOSX WidgetRenderingContext() : mLayerManager(nullptr) {} layers::LayerManagerComposite* mLayerManager; -#elif defined(MOZ_WIDGET_ANDROID) - WidgetRenderingContext() : mCompositor(nullptr) {} - layers::Compositor* mCompositor; #endif }; @@ -262,9 +258,6 @@ public: virtual X11CompositorWidget* AsX11() { return nullptr; } - virtual AndroidCompositorWidget* AsAndroid() { - return nullptr; - } /** * Return the platform-specific delegate for the widget, if any. diff --git a/widget/EventMessageList.h b/widget/EventMessageList.h index 890a26dcd..7ff16c484 100644 --- a/widget/EventMessageList.h +++ b/widget/EventMessageList.h @@ -379,9 +379,6 @@ NS_EVENT_MESSAGE(eDeviceMotion) NS_EVENT_MESSAGE(eDeviceProximity) NS_EVENT_MESSAGE(eUserProximity) NS_EVENT_MESSAGE(eDeviceLight) -#if defined(MOZ_WIDGET_ANDROID) -NS_EVENT_MESSAGE(eOrientationChange) -#endif // WebVR events NS_EVENT_MESSAGE(eVRDisplayConnect) diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h index 99d560b81..256142c87 100644 --- a/widget/GfxDriverInfo.h +++ b/widget/GfxDriverInfo.h @@ -58,7 +58,6 @@ enum class OperatingSystem { OSX10_10, OSX10_11, OSX10_12, - Android, Ios }; @@ -283,12 +282,6 @@ ParseDriverVersion(const nsAString& aVersion, uint64_t *aNumericVersion) *aNumericVersion = GFX_DRIVER_VERSION(a, b, c, d); MOZ_ASSERT(*aNumericVersion != GfxDriverInfo::allDriverVersions); return true; -#elif defined(ANDROID) - // Can't use aVersion.ToInteger() because that's not compiled into our code - // unless we have XPCOM_GLUE_AVOID_NSPR disabled. - *aNumericVersion = atoi(NS_LossyConvertUTF16toASCII(aVersion).get()); - MOZ_ASSERT(*aNumericVersion != GfxDriverInfo::allDriverVersions); - return true; #else return false; #endif diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index e20de8277..4c2d83018 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -274,8 +274,6 @@ BlacklistOSToOperatingSystem(const nsAString& os) return OperatingSystem::OSX10_11; else if (os.EqualsLiteral("Darwin 16")) return OperatingSystem::OSX10_12; - else if (os.EqualsLiteral("Android")) - return OperatingSystem::Android; // For historical reasons, "All" in blocklist means "All Windows" else if (os.EqualsLiteral("All")) return OperatingSystem::Windows; @@ -691,7 +689,7 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray<GfxDriverInfo>& info, } } -#if defined(XP_WIN) || defined(ANDROID) +#ifdef XP_WIN uint64_t driverVersion; ParseDriverVersion(adapterDriverVersionString, &driverVersion); #endif @@ -730,7 +728,7 @@ GfxInfoBase::FindBlocklistedDeviceInList(const nsTArray<GfxDriverInfo>& info, continue; } -#if defined(XP_WIN) || defined(ANDROID) +#ifdef XP_WIN switch (info[i].mComparisonOp) { case DRIVER_LESS_THAN: match = driverVersion < info[i].mDriverVersion; diff --git a/widget/InProcessCompositorWidget.cpp b/widget/InProcessCompositorWidget.cpp index 9b301fc48..df7250d9f 100644 --- a/widget/InProcessCompositorWidget.cpp +++ b/widget/InProcessCompositorWidget.cpp @@ -5,10 +5,6 @@ #include "InProcessCompositorWidget.h" #include "nsBaseWidget.h" -#if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) -#include "mozilla/widget/AndroidCompositorWidget.h" -#endif - namespace mozilla { namespace widget { @@ -19,11 +15,7 @@ namespace widget { CompositorWidget::CreateLocal(const CompositorWidgetInitData& aInitData, nsIWidget* aWidget) { MOZ_ASSERT(aWidget); -#ifdef MOZ_WIDGET_ANDROID - return new AndroidCompositorWidget(static_cast<nsBaseWidget*>(aWidget)); -#else return new InProcessCompositorWidget(static_cast<nsBaseWidget*>(aWidget)); -#endif } #endif diff --git a/widget/NativeKeyToDOMCodeName.h b/widget/NativeKeyToDOMCodeName.h index cd326a0d8..159b0773c 100644 --- a/widget/NativeKeyToDOMCodeName.h +++ b/widget/NativeKeyToDOMCodeName.h @@ -21,8 +21,6 @@ #define CODE_MAP_MAC(aCPPCodeName, aNativeKey) // GTK and Qt on Linux #define CODE_MAP_X11(aCPPCodeName, aNativeKey) -// Android and Gonk -#define CODE_MAP_ANDROID(aCPPCodeName, aNativeKey) #if defined(XP_WIN) #undef CODE_MAP_WIN @@ -42,780 +40,613 @@ #define CODE_MAP_X11(aCPPCodeName, aNativeKey) \ NS_NATIVE_KEY_TO_DOM_CODE_NAME_INDEX(aNativeKey, \ CODE_NAME_INDEX_##aCPPCodeName) -#elif defined(ANDROID) -#undef CODE_MAP_ANDROID -// aNativeKey is scan code -#define CODE_MAP_ANDROID(aCPPCodeName, aNativeKey) \ - NS_NATIVE_KEY_TO_DOM_CODE_NAME_INDEX(aNativeKey, \ - CODE_NAME_INDEX_##aCPPCodeName) #endif // Writing system keys CODE_MAP_WIN(Backquote, 0x0029) CODE_MAP_MAC(Backquote, kVK_ANSI_Grave) CODE_MAP_X11(Backquote, 0x0031) -CODE_MAP_ANDROID(Backquote, 0x0029) CODE_MAP_WIN(Backslash, 0x002B) CODE_MAP_MAC(Backslash, kVK_ANSI_Backslash) CODE_MAP_X11(Backslash, 0x0033) -CODE_MAP_ANDROID(Backslash, 0x002B) CODE_MAP_WIN(Backspace, 0x000E) CODE_MAP_MAC(Backspace, kVK_Delete) CODE_MAP_X11(Backspace, 0x0016) -CODE_MAP_ANDROID(Backspace, 0x000E) CODE_MAP_WIN(BracketLeft, 0x001A) CODE_MAP_MAC(BracketLeft, kVK_ANSI_LeftBracket) CODE_MAP_X11(BracketLeft, 0x0022) -CODE_MAP_ANDROID(BracketLeft, 0x001A) CODE_MAP_WIN(BracketRight, 0x001B) CODE_MAP_MAC(BracketRight, kVK_ANSI_RightBracket) CODE_MAP_X11(BracketRight, 0x0023) -CODE_MAP_ANDROID(BracketRight, 0x001B) CODE_MAP_WIN(Comma, 0x0033) CODE_MAP_MAC(Comma, kVK_ANSI_Comma) CODE_MAP_X11(Comma, 0x003B) -CODE_MAP_ANDROID(Comma, 0x00033) CODE_MAP_WIN(Digit0, 0x000B) CODE_MAP_MAC(Digit0, kVK_ANSI_0) CODE_MAP_X11(Digit0, 0x0013) -CODE_MAP_ANDROID(Digit0, 0x000B) CODE_MAP_WIN(Digit1, 0x0002) CODE_MAP_MAC(Digit1, kVK_ANSI_1) CODE_MAP_X11(Digit1, 0x000A) -CODE_MAP_ANDROID(Digit1, 0x0002) CODE_MAP_WIN(Digit2, 0x0003) CODE_MAP_MAC(Digit2, kVK_ANSI_2) CODE_MAP_X11(Digit2, 0x000B) -CODE_MAP_ANDROID(Digit2, 0x0003) CODE_MAP_WIN(Digit3, 0x0004) CODE_MAP_MAC(Digit3, kVK_ANSI_3) CODE_MAP_X11(Digit3, 0x000C) -CODE_MAP_ANDROID(Digit3, 0x0004) CODE_MAP_WIN(Digit4, 0x0005) CODE_MAP_MAC(Digit4, kVK_ANSI_4) CODE_MAP_X11(Digit4, 0x000D) -CODE_MAP_ANDROID(Digit4, 0x0005) CODE_MAP_WIN(Digit5, 0x0006) CODE_MAP_MAC(Digit5, kVK_ANSI_5) CODE_MAP_X11(Digit5, 0x000E) -CODE_MAP_ANDROID(Digit5, 0x0006) CODE_MAP_WIN(Digit6, 0x0007) CODE_MAP_MAC(Digit6, kVK_ANSI_6) CODE_MAP_X11(Digit6, 0x000F) -CODE_MAP_ANDROID(Digit6, 0x0007) CODE_MAP_WIN(Digit7, 0x0008) CODE_MAP_MAC(Digit7, kVK_ANSI_7) CODE_MAP_X11(Digit7, 0x0010) -CODE_MAP_ANDROID(Digit7, 0x0008) CODE_MAP_WIN(Digit8, 0x0009) CODE_MAP_MAC(Digit8, kVK_ANSI_8) CODE_MAP_X11(Digit8, 0x0011) -CODE_MAP_ANDROID(Digit8, 0x0009) CODE_MAP_WIN(Digit9, 0x000A) CODE_MAP_MAC(Digit9, kVK_ANSI_9) CODE_MAP_X11(Digit9, 0x0012) -CODE_MAP_ANDROID(Digit9, 0x000A) CODE_MAP_WIN(Equal, 0x000D) CODE_MAP_MAC(Equal, kVK_ANSI_Equal) CODE_MAP_X11(Equal, 0x0015) -CODE_MAP_ANDROID(Equal, 0x000D) CODE_MAP_WIN(IntlBackslash, 0x0056) CODE_MAP_MAC(IntlBackslash, kVK_ISO_Section) CODE_MAP_X11(IntlBackslash, 0x005E) -CODE_MAP_ANDROID(IntlBackslash, 0x0056) // Win: IntlHash's scan code is shared with "Backslash" key. // Mac: IntlHash's virtual key code is shared with "Backslash" key. // X11: IntlHash's scan code is shared with "Backslash" key. -// Android: IntlHash's scan code is shared with "Backslash" key. CODE_MAP_WIN(IntlRo, 0x0073) CODE_MAP_MAC(IntlRo, kVK_JIS_Underscore) CODE_MAP_X11(IntlRo, 0x0061) -CODE_MAP_ANDROID(IntlRo, 0x0059) CODE_MAP_WIN(IntlYen, 0x007D) CODE_MAP_MAC(IntlYen, kVK_JIS_Yen) CODE_MAP_X11(IntlYen, 0x0084) -CODE_MAP_ANDROID(IntlYen, 0x007C) CODE_MAP_WIN(KeyA, 0x001E) CODE_MAP_MAC(KeyA, kVK_ANSI_A) CODE_MAP_X11(KeyA, 0x0026) -CODE_MAP_ANDROID(KeyA, 0x001E) CODE_MAP_WIN(KeyB, 0x0030) CODE_MAP_MAC(KeyB, kVK_ANSI_B) CODE_MAP_X11(KeyB, 0x0038) -CODE_MAP_ANDROID(KeyB, 0x0030) CODE_MAP_WIN(KeyC, 0x002E) CODE_MAP_MAC(KeyC, kVK_ANSI_C) CODE_MAP_X11(KeyC, 0x0036) -CODE_MAP_ANDROID(KeyC, 0x002E) CODE_MAP_WIN(KeyD, 0x0020) CODE_MAP_MAC(KeyD, kVK_ANSI_D) CODE_MAP_X11(KeyD, 0x0028) -CODE_MAP_ANDROID(KeyD, 0x0020) CODE_MAP_WIN(KeyE, 0x0012) CODE_MAP_MAC(KeyE, kVK_ANSI_E) CODE_MAP_X11(KeyE, 0x001A) -CODE_MAP_ANDROID(KeyE, 0x0012) CODE_MAP_WIN(KeyF, 0x0021) CODE_MAP_MAC(KeyF, kVK_ANSI_F) CODE_MAP_X11(KeyF, 0x0029) -CODE_MAP_ANDROID(KeyF, 0x0021) CODE_MAP_WIN(KeyG, 0x0022) CODE_MAP_MAC(KeyG, kVK_ANSI_G) CODE_MAP_X11(KeyG, 0x002A) -CODE_MAP_ANDROID(KeyG, 0x0022) CODE_MAP_WIN(KeyH, 0x0023) CODE_MAP_MAC(KeyH, kVK_ANSI_H) CODE_MAP_X11(KeyH, 0x002B) -CODE_MAP_ANDROID(KeyH, 0x0023) CODE_MAP_WIN(KeyI, 0x0017) CODE_MAP_MAC(KeyI, kVK_ANSI_I) CODE_MAP_X11(KeyI, 0x001F) -CODE_MAP_ANDROID(KeyI, 0x0017) CODE_MAP_WIN(KeyJ, 0x0024) CODE_MAP_MAC(KeyJ, kVK_ANSI_J) CODE_MAP_X11(KeyJ, 0x002C) -CODE_MAP_ANDROID(KeyJ, 0x0024) CODE_MAP_WIN(KeyK, 0x0025) CODE_MAP_MAC(KeyK, kVK_ANSI_K) CODE_MAP_X11(KeyK, 0x002D) -CODE_MAP_ANDROID(KeyK, 0x0025) CODE_MAP_WIN(KeyL, 0x0026) CODE_MAP_MAC(KeyL, kVK_ANSI_L) CODE_MAP_X11(KeyL, 0x002E) -CODE_MAP_ANDROID(KeyL, 0x0026) CODE_MAP_WIN(KeyM, 0x0032) CODE_MAP_MAC(KeyM, kVK_ANSI_M) CODE_MAP_X11(KeyM, 0x003A) -CODE_MAP_ANDROID(KeyM, 0x0032) CODE_MAP_WIN(KeyN, 0x0031) CODE_MAP_MAC(KeyN, kVK_ANSI_N) CODE_MAP_X11(KeyN, 0x0039) -CODE_MAP_ANDROID(KeyN, 0x0031) CODE_MAP_WIN(KeyO, 0x0018) CODE_MAP_MAC(KeyO, kVK_ANSI_O) CODE_MAP_X11(KeyO, 0x0020) -CODE_MAP_ANDROID(KeyO, 0x0018) CODE_MAP_WIN(KeyP, 0x0019) CODE_MAP_MAC(KeyP, kVK_ANSI_P) CODE_MAP_X11(KeyP, 0x0021) -CODE_MAP_ANDROID(KeyP, 0x0019) CODE_MAP_WIN(KeyQ, 0x0010) CODE_MAP_MAC(KeyQ, kVK_ANSI_Q) CODE_MAP_X11(KeyQ, 0x0018) -CODE_MAP_ANDROID(KeyQ, 0x0010) CODE_MAP_WIN(KeyR, 0x0013) CODE_MAP_MAC(KeyR, kVK_ANSI_R) CODE_MAP_X11(KeyR, 0x001B) -CODE_MAP_ANDROID(KeyR, 0x0013) CODE_MAP_WIN(KeyS, 0x001F) CODE_MAP_MAC(KeyS, kVK_ANSI_S) CODE_MAP_X11(KeyS, 0x0027) -CODE_MAP_ANDROID(KeyS, 0x001F) CODE_MAP_WIN(KeyT, 0x0014) CODE_MAP_MAC(KeyT, kVK_ANSI_T) CODE_MAP_X11(KeyT, 0x001C) -CODE_MAP_ANDROID(KeyT, 0x0014) CODE_MAP_WIN(KeyU, 0x0016) CODE_MAP_MAC(KeyU, kVK_ANSI_U) CODE_MAP_X11(KeyU, 0x001E) -CODE_MAP_ANDROID(KeyU, 0x0016) CODE_MAP_WIN(KeyV, 0x002F) CODE_MAP_MAC(KeyV, kVK_ANSI_V) CODE_MAP_X11(KeyV, 0x0037) -CODE_MAP_ANDROID(KeyV, 0x002F) CODE_MAP_WIN(KeyW, 0x0011) CODE_MAP_MAC(KeyW, kVK_ANSI_W) CODE_MAP_X11(KeyW, 0x0019) -CODE_MAP_ANDROID(KeyW, 0x0011) CODE_MAP_WIN(KeyX, 0x002D) CODE_MAP_MAC(KeyX, kVK_ANSI_X) CODE_MAP_X11(KeyX, 0x0035) -CODE_MAP_ANDROID(KeyX, 0x002D) CODE_MAP_WIN(KeyY, 0x0015) CODE_MAP_MAC(KeyY, kVK_ANSI_Y) CODE_MAP_X11(KeyY, 0x001D) -CODE_MAP_ANDROID(KeyY, 0x0015) CODE_MAP_WIN(KeyZ, 0x002C) CODE_MAP_MAC(KeyZ, kVK_ANSI_Z) CODE_MAP_X11(KeyZ, 0x0034) -CODE_MAP_ANDROID(KeyZ, 0x002C) CODE_MAP_WIN(Minus, 0x000C) CODE_MAP_MAC(Minus, kVK_ANSI_Minus) CODE_MAP_X11(Minus, 0x0014) -CODE_MAP_ANDROID(Minus, 0x000C) CODE_MAP_WIN(Period, 0x0034) CODE_MAP_MAC(Period, kVK_ANSI_Period) CODE_MAP_X11(Period, 0x003C) -CODE_MAP_ANDROID(Period, 0x0034) CODE_MAP_WIN(Quote, 0x0028) CODE_MAP_MAC(Quote, kVK_ANSI_Quote) CODE_MAP_X11(Quote, 0x0030) -CODE_MAP_ANDROID(Quote, 0x0028) CODE_MAP_WIN(Semicolon, 0x0027) CODE_MAP_MAC(Semicolon, kVK_ANSI_Semicolon) CODE_MAP_X11(Semicolon, 0x002F) -CODE_MAP_ANDROID(Semicolon, 0x0027) CODE_MAP_WIN(Slash, 0x0035) CODE_MAP_MAC(Slash, kVK_ANSI_Slash) CODE_MAP_X11(Slash, 0x003D) -CODE_MAP_ANDROID(Slash, 0x0035) // Functional keys CODE_MAP_WIN(AltLeft, 0x0038) CODE_MAP_MAC(AltLeft, kVK_Option) CODE_MAP_X11(AltLeft, 0x0040) -CODE_MAP_ANDROID(AltLeft, 0x0038) CODE_MAP_WIN(AltRight, 0xE038) CODE_MAP_MAC(AltRight, kVK_RightOption) CODE_MAP_X11(AltRight, 0x006C) -CODE_MAP_ANDROID(AltRight, 0x0064) CODE_MAP_WIN(CapsLock, 0x003A) CODE_MAP_MAC(CapsLock, kVK_CapsLock) CODE_MAP_X11(CapsLock, 0x0042) -CODE_MAP_ANDROID(CapsLock, 0x003A) CODE_MAP_WIN(ContextMenu, 0xE05D) CODE_MAP_MAC(ContextMenu, kVK_PC_ContextMenu) CODE_MAP_X11(ContextMenu, 0x0087) -CODE_MAP_ANDROID(ContextMenu, 0x007F) CODE_MAP_WIN(ControlLeft, 0x001D) CODE_MAP_MAC(ControlLeft, kVK_Control) CODE_MAP_X11(ControlLeft, 0x0025) -CODE_MAP_ANDROID(ControlLeft, 0x001D) CODE_MAP_WIN(ControlRight, 0xE01D) CODE_MAP_MAC(ControlRight, kVK_RightControl) CODE_MAP_X11(ControlRight, 0x0069) -CODE_MAP_ANDROID(ControlRight, 0x0061) CODE_MAP_WIN(Enter, 0x001C) CODE_MAP_MAC(Enter, kVK_Return) CODE_MAP_X11(Enter, 0x0024) -CODE_MAP_ANDROID(Enter, 0x001C) CODE_MAP_WIN(OSLeft, 0xE05B) CODE_MAP_MAC(OSLeft, kVK_Command) CODE_MAP_X11(OSLeft, 0x0085) -CODE_MAP_ANDROID(OSLeft, 0x007D) CODE_MAP_WIN(OSRight, 0xE05C) CODE_MAP_MAC(OSRight, kVK_RightCommand) CODE_MAP_X11(OSRight, 0x0086) -CODE_MAP_ANDROID(OSRight, 0x007E) CODE_MAP_WIN(ShiftLeft, 0x002A) CODE_MAP_MAC(ShiftLeft, kVK_Shift) CODE_MAP_X11(ShiftLeft, 0x0032) -CODE_MAP_ANDROID(ShiftLeft, 0x002A) CODE_MAP_WIN(ShiftRight, 0x0036) CODE_MAP_MAC(ShiftRight, kVK_RightShift) CODE_MAP_X11(ShiftRight, 0x003E) -CODE_MAP_ANDROID(ShiftRight, 0x0036) CODE_MAP_WIN(Space, 0x0039) CODE_MAP_MAC(Space, kVK_Space) CODE_MAP_X11(Space, 0x0041) -CODE_MAP_ANDROID(Space, 0x0039) CODE_MAP_WIN(Tab, 0x000F) CODE_MAP_MAC(Tab, kVK_Tab) CODE_MAP_X11(Tab, 0x0017) -CODE_MAP_ANDROID(Tab, 0x000F) // IME keys CODE_MAP_WIN(Convert, 0x0079) CODE_MAP_X11(Convert, 0x0064) -CODE_MAP_ANDROID(Convert, 0x005C) CODE_MAP_WIN(Lang1, 0x0072) // for non-Korean layout CODE_MAP_WIN(Lang1, 0xE0F2) // for Korean layout CODE_MAP_MAC(Lang1, kVK_JIS_Kana) CODE_MAP_X11(Lang1, 0x0082) -CODE_MAP_ANDROID(Lang1, 0x007A) CODE_MAP_WIN(Lang2, 0x0071) // for non-Korean layout CODE_MAP_WIN(Lang2, 0xE0F1) // for Korean layout CODE_MAP_MAC(Lang2, kVK_JIS_Eisu) CODE_MAP_X11(Lang2, 0x0083) -CODE_MAP_ANDROID(Lang2, 0x007B) CODE_MAP_WIN(KanaMode, 0x0070) CODE_MAP_X11(KanaMode, 0x0065) -CODE_MAP_ANDROID(KanaMode, 0x005D) CODE_MAP_WIN(NonConvert, 0x007B) CODE_MAP_X11(NonConvert, 0x0066) -CODE_MAP_ANDROID(NonConvert, 0x005E) // Control pad section CODE_MAP_WIN(Delete, 0xE053) CODE_MAP_MAC(Delete, kVK_ForwardDelete) CODE_MAP_X11(Delete, 0x0077) -CODE_MAP_ANDROID(Delete, 0x006F) CODE_MAP_WIN(End, 0xE04F) CODE_MAP_MAC(End, kVK_End) CODE_MAP_X11(End, 0x0073) -CODE_MAP_ANDROID(End, 0x006B) CODE_MAP_MAC(Help, kVK_Help) // Insert key on PC keyboard CODE_MAP_X11(Help, 0x0092) // Help key on Sun keyboard -CODE_MAP_ANDROID(Help, 0x008A) // Help key on Sun keyboard CODE_MAP_WIN(Home, 0xE047) CODE_MAP_MAC(Home, kVK_Home) CODE_MAP_X11(Home, 0x006E) -CODE_MAP_ANDROID(Home, 0x0066) CODE_MAP_WIN(Insert, 0xE052) CODE_MAP_X11(Insert, 0x0076) -CODE_MAP_ANDROID(Insert, 0x006E) CODE_MAP_WIN(PageDown, 0xE051) CODE_MAP_MAC(PageDown, kVK_PageDown) CODE_MAP_X11(PageDown, 0x0075) -CODE_MAP_ANDROID(PageDown, 0x006D) CODE_MAP_WIN(PageUp, 0xE049) CODE_MAP_MAC(PageUp, kVK_PageUp) CODE_MAP_X11(PageUp, 0x0070) -CODE_MAP_ANDROID(PageUp, 0x0068) // Arrow pad section CODE_MAP_WIN(ArrowDown, 0xE050) CODE_MAP_MAC(ArrowDown, kVK_DownArrow) CODE_MAP_X11(ArrowDown, 0x0074) -CODE_MAP_ANDROID(ArrowDown, 0x006C) CODE_MAP_WIN(ArrowLeft, 0xE04B) CODE_MAP_MAC(ArrowLeft, kVK_LeftArrow) CODE_MAP_X11(ArrowLeft, 0x0071) -CODE_MAP_ANDROID(ArrowLeft, 0x0069) CODE_MAP_WIN(ArrowRight, 0xE04D) CODE_MAP_MAC(ArrowRight, kVK_RightArrow) CODE_MAP_X11(ArrowRight, 0x0072) -CODE_MAP_ANDROID(ArrowRight, 0x006A) CODE_MAP_WIN(ArrowUp, 0xE048) CODE_MAP_MAC(ArrowUp, kVK_UpArrow) CODE_MAP_X11(ArrowUp, 0x006F) -CODE_MAP_ANDROID(ArrowUp, 0x0067) // Numpad section CODE_MAP_WIN(NumLock, 0xE045) // MSDN says 0x0045, though... CODE_MAP_MAC(NumLock, kVK_ANSI_KeypadClear) CODE_MAP_X11(NumLock, 0x004D) -CODE_MAP_ANDROID(NumLock, 0x0045) CODE_MAP_WIN(Numpad0, 0x0052) CODE_MAP_MAC(Numpad0, kVK_ANSI_Keypad0) CODE_MAP_X11(Numpad0, 0x005A) -CODE_MAP_ANDROID(Numpad0, 0x0052) CODE_MAP_WIN(Numpad1, 0x004F) CODE_MAP_MAC(Numpad1, kVK_ANSI_Keypad1) CODE_MAP_X11(Numpad1, 0x0057) -CODE_MAP_ANDROID(Numpad1, 0x004F) CODE_MAP_WIN(Numpad2, 0x0050) CODE_MAP_MAC(Numpad2, kVK_ANSI_Keypad2) CODE_MAP_X11(Numpad2, 0x0058) -CODE_MAP_ANDROID(Numpad2, 0x0050) CODE_MAP_WIN(Numpad3, 0x0051) CODE_MAP_MAC(Numpad3, kVK_ANSI_Keypad3) CODE_MAP_X11(Numpad3, 0x0059) -CODE_MAP_ANDROID(Numpad3, 0x0051) CODE_MAP_WIN(Numpad4, 0x004B) CODE_MAP_MAC(Numpad4, kVK_ANSI_Keypad4) CODE_MAP_X11(Numpad4, 0x0053) -CODE_MAP_ANDROID(Numpad4, 0x004B) CODE_MAP_WIN(Numpad5, 0x004C) CODE_MAP_MAC(Numpad5, kVK_ANSI_Keypad5) CODE_MAP_X11(Numpad5, 0x0054) -CODE_MAP_ANDROID(Numpad5, 0x004C) CODE_MAP_WIN(Numpad6, 0x004D) CODE_MAP_MAC(Numpad6, kVK_ANSI_Keypad6) CODE_MAP_X11(Numpad6, 0x0055) -CODE_MAP_ANDROID(Numpad6, 0x004D) CODE_MAP_WIN(Numpad7, 0x0047) CODE_MAP_MAC(Numpad7, kVK_ANSI_Keypad7) CODE_MAP_X11(Numpad7, 0x004F) -CODE_MAP_ANDROID(Numpad7, 0x0047) CODE_MAP_WIN(Numpad8, 0x0048) CODE_MAP_MAC(Numpad8, kVK_ANSI_Keypad8) CODE_MAP_X11(Numpad8, 0x0050) -CODE_MAP_ANDROID(Numpad8, 0x0048) CODE_MAP_WIN(Numpad9, 0x0049) CODE_MAP_MAC(Numpad9, kVK_ANSI_Keypad9) CODE_MAP_X11(Numpad9, 0x0051) -CODE_MAP_ANDROID(Numpad9, 0x0049) CODE_MAP_WIN(NumpadAdd, 0x004E) CODE_MAP_MAC(NumpadAdd, kVK_ANSI_KeypadPlus) CODE_MAP_X11(NumpadAdd, 0x0056) -CODE_MAP_ANDROID(NumpadAdd, 0x004E) CODE_MAP_WIN(NumpadComma, 0x007E) CODE_MAP_MAC(NumpadComma, kVK_JIS_KeypadComma) CODE_MAP_X11(NumpadComma, 0x0081) -CODE_MAP_ANDROID(NumpadComma, 0x0079) CODE_MAP_WIN(NumpadDecimal, 0x0053) CODE_MAP_MAC(NumpadDecimal, kVK_ANSI_KeypadDecimal) CODE_MAP_X11(NumpadDecimal, 0x005B) -CODE_MAP_ANDROID(NumpadDecimal, 0x0053) CODE_MAP_WIN(NumpadDivide, 0xE035) CODE_MAP_MAC(NumpadDivide, kVK_ANSI_KeypadDivide) CODE_MAP_X11(NumpadDivide, 0x006A) -CODE_MAP_ANDROID(NumpadDivide, 0x0062) CODE_MAP_WIN(NumpadEnter, 0xE01C) CODE_MAP_MAC(NumpadEnter, kVK_ANSI_KeypadEnter) CODE_MAP_MAC(NumpadEnter, kVK_Powerbook_KeypadEnter) CODE_MAP_X11(NumpadEnter, 0x0068) -CODE_MAP_ANDROID(NumpadEnter, 0x0060) CODE_MAP_WIN(NumpadEqual, 0x0059) CODE_MAP_MAC(NumpadEqual, kVK_ANSI_KeypadEquals) CODE_MAP_X11(NumpadEqual, 0x007D) -CODE_MAP_ANDROID(NumpadEqual, 0x0075) CODE_MAP_WIN(NumpadMultiply, 0x0037) CODE_MAP_MAC(NumpadMultiply, kVK_ANSI_KeypadMultiply) CODE_MAP_X11(NumpadMultiply, 0x003F) -CODE_MAP_ANDROID(NumpadMultiply, 0x0037) CODE_MAP_WIN(NumpadSubtract, 0x004A) CODE_MAP_MAC(NumpadSubtract, kVK_ANSI_KeypadMinus) CODE_MAP_X11(NumpadSubtract, 0x0052) -CODE_MAP_ANDROID(NumpadSubtract, 0x004A) // Function section CODE_MAP_WIN(Escape, 0x0001) CODE_MAP_MAC(Escape, kVK_Escape) CODE_MAP_X11(Escape, 0x0009) -CODE_MAP_ANDROID(Escape, 0x0001) CODE_MAP_WIN(F1, 0x003B) CODE_MAP_MAC(F1, kVK_F1) CODE_MAP_X11(F1, 0x0043) -CODE_MAP_ANDROID(F1, 0x003B) CODE_MAP_WIN(F2, 0x003C) CODE_MAP_MAC(F2, kVK_F2) CODE_MAP_X11(F2, 0x0044) -CODE_MAP_ANDROID(F2, 0x003C) CODE_MAP_WIN(F3, 0x003D) CODE_MAP_MAC(F3, kVK_F3) CODE_MAP_X11(F3, 0x0045) -CODE_MAP_ANDROID(F3, 0x003D) CODE_MAP_WIN(F4, 0x003E) CODE_MAP_MAC(F4, kVK_F4) CODE_MAP_X11(F4, 0x0046) -CODE_MAP_ANDROID(F4, 0x003E) CODE_MAP_WIN(F5, 0x003F) CODE_MAP_MAC(F5, kVK_F5) CODE_MAP_X11(F5, 0x0047) -CODE_MAP_ANDROID(F5, 0x003F) CODE_MAP_WIN(F6, 0x0040) CODE_MAP_MAC(F6, kVK_F6) CODE_MAP_X11(F6, 0x0048) -CODE_MAP_ANDROID(F6, 0x0040) CODE_MAP_WIN(F7, 0x0041) CODE_MAP_MAC(F7, kVK_F7) CODE_MAP_X11(F7, 0x0049) -CODE_MAP_ANDROID(F7, 0x0041) CODE_MAP_WIN(F8, 0x0042) CODE_MAP_MAC(F8, kVK_F8) CODE_MAP_X11(F8, 0x004A) -CODE_MAP_ANDROID(F8, 0x0042) CODE_MAP_WIN(F9, 0x0043) CODE_MAP_MAC(F9, kVK_F9) CODE_MAP_X11(F9, 0x004B) -CODE_MAP_ANDROID(F9, 0x0043) CODE_MAP_WIN(F10, 0x0044) CODE_MAP_MAC(F10, kVK_F10) CODE_MAP_X11(F10, 0x004C) -CODE_MAP_ANDROID(F10, 0x0044) CODE_MAP_WIN(F11, 0x0057) CODE_MAP_MAC(F11, kVK_F11) CODE_MAP_X11(F11, 0x005F) -CODE_MAP_ANDROID(F11, 0x0057) CODE_MAP_WIN(F12, 0x0058) CODE_MAP_MAC(F12, kVK_F12) CODE_MAP_X11(F12, 0x0060) -CODE_MAP_ANDROID(F12, 0x0058) CODE_MAP_WIN(F13, 0x0064) CODE_MAP_MAC(F13, kVK_F13) // PrintScreen on PC keyboard CODE_MAP_X11(F13, 0x00BF) -CODE_MAP_ANDROID(F13, 0x00B7) CODE_MAP_WIN(F14, 0x0065) CODE_MAP_MAC(F14, kVK_F14) // ScrollLock on PC keyboard CODE_MAP_X11(F14, 0x00C0) -CODE_MAP_ANDROID(F14, 0x00B8) CODE_MAP_WIN(F15, 0x0066) CODE_MAP_MAC(F15, kVK_F15) // Pause on PC keyboard CODE_MAP_X11(F15, 0x00C1) -CODE_MAP_ANDROID(F15, 0x00B9) CODE_MAP_WIN(F16, 0x0067) CODE_MAP_MAC(F16, kVK_F16) CODE_MAP_X11(F16, 0x00C2) -CODE_MAP_ANDROID(F16, 0x00BA) CODE_MAP_WIN(F17, 0x0068) CODE_MAP_MAC(F17, kVK_F17) CODE_MAP_X11(F17, 0x00C3) -CODE_MAP_ANDROID(F17, 0x00BB) CODE_MAP_WIN(F18, 0x0069) CODE_MAP_MAC(F18, kVK_F18) CODE_MAP_X11(F18, 0x00C4) -CODE_MAP_ANDROID(F18, 0x00BC) CODE_MAP_WIN(F19, 0x006A) CODE_MAP_MAC(F19, kVK_F19) CODE_MAP_X11(F19, 0x00C5) -CODE_MAP_ANDROID(F19, 0x00BD) CODE_MAP_WIN(F20, 0x006B) CODE_MAP_MAC(F20, kVK_F20) CODE_MAP_X11(F20, 0x00C6) -CODE_MAP_ANDROID(F20, 0x00BE) CODE_MAP_WIN(F21, 0x006C) CODE_MAP_X11(F21, 0x00C7) -CODE_MAP_ANDROID(F21, 0x00BF) CODE_MAP_WIN(F22, 0x006D) CODE_MAP_X11(F22, 0x00C8) -CODE_MAP_ANDROID(F22, 0x00C0) CODE_MAP_WIN(F23, 0x006E) CODE_MAP_X11(F23, 0x00C9) -CODE_MAP_ANDROID(F23, 0x00C1) CODE_MAP_WIN(F24, 0x0076) CODE_MAP_X11(F24, 0x00CA) -CODE_MAP_ANDROID(F24, 0x00C2) CODE_MAP_MAC(Fn, kVK_Function) // not available? -CODE_MAP_ANDROID(Fn, 0x01D0) CODE_MAP_WIN(PrintScreen, 0xE037) CODE_MAP_WIN(PrintScreen, 0x0054) // Alt + PrintScreen CODE_MAP_X11(PrintScreen, 0x006B) -CODE_MAP_ANDROID(PrintScreen, 0x0063) CODE_MAP_WIN(ScrollLock, 0x0046) CODE_MAP_X11(ScrollLock, 0x004E) -CODE_MAP_ANDROID(ScrollLock, 0x0046) CODE_MAP_WIN(Pause, 0x0045) CODE_MAP_WIN(Pause, 0xE046) // Ctrl + Pause CODE_MAP_X11(Pause, 0x007F) -CODE_MAP_ANDROID(Pause, 0x0077) // Media keys CODE_MAP_WIN(BrowserBack, 0xE06A) CODE_MAP_X11(BrowserBack, 0x00A6) -CODE_MAP_ANDROID(BrowserBack, 0x009E) CODE_MAP_WIN(BrowserFavorites, 0xE066) CODE_MAP_X11(BrowserFavorites, 0x00A4) -CODE_MAP_ANDROID(BrowserFavorites, 0x009C) CODE_MAP_WIN(BrowserForward, 0xE069) CODE_MAP_X11(BrowserForward, 0x00A7) -CODE_MAP_ANDROID(BrowserForward, 0x009F) CODE_MAP_WIN(BrowserHome, 0xE032) CODE_MAP_X11(BrowserHome, 0x00B4) -// CODE_MAP_ANDROID(BrowserHome) // not available? works as Home key. CODE_MAP_WIN(BrowserRefresh, 0xE067) CODE_MAP_X11(BrowserRefresh, 0x00B5) -CODE_MAP_ANDROID(BrowserRefresh, 0x00AD) CODE_MAP_WIN(BrowserSearch, 0xE065) CODE_MAP_X11(BrowserSearch, 0x00E1) -CODE_MAP_ANDROID(BrowserSearch, 0x00D9) CODE_MAP_WIN(BrowserStop, 0xE068) CODE_MAP_X11(BrowserStop, 0x0088) -CODE_MAP_ANDROID(BrowserStop, 0x0080) // CODE_MAP_WIN(Eject) // not available? // CODE_MAP_MAC(Eject) // not available? CODE_MAP_X11(Eject, 0x00A9) -CODE_MAP_ANDROID(Eject, 0x00A1) CODE_MAP_WIN(LaunchApp1, 0xE06B) CODE_MAP_X11(LaunchApp1, 0x0098) -CODE_MAP_ANDROID(LaunchApp1, 0x0090) CODE_MAP_WIN(LaunchApp2, 0xE021) CODE_MAP_X11(LaunchApp2, 0x0094) -// CODE_MAP_ANDROID(LaunchApp2) // not available? CODE_MAP_WIN(LaunchMail, 0xE06C) CODE_MAP_X11(LaunchMail, 0x00A3) -// CODE_MAP_ANDROID(LaunchMail) // not available? CODE_MAP_WIN(MediaPlayPause, 0xE022) CODE_MAP_X11(MediaPlayPause, 0x00AC) -CODE_MAP_ANDROID(MediaPlayPause, 0x00A4) CODE_MAP_WIN(MediaSelect, 0xE06D) CODE_MAP_X11(MediaSelect, 0x00B3) -// CODE_MAP_ANDROID(MediaSelect) // not available? CODE_MAP_WIN(MediaStop, 0xE024) CODE_MAP_X11(MediaStop, 0x00AE) -CODE_MAP_ANDROID(MediaStop, 0x00A6) CODE_MAP_WIN(MediaTrackNext, 0xE019) CODE_MAP_X11(MediaTrackNext, 0x00AB) -CODE_MAP_ANDROID(MediaTrackNext, 0x00A3) CODE_MAP_WIN(MediaTrackPrevious, 0xE010) CODE_MAP_X11(MediaTrackPrevious, 0x00AD) -CODE_MAP_ANDROID(MediaTrackPrevious, 0x00A5) CODE_MAP_WIN(Power, 0xE05E) CODE_MAP_MAC(Power, 0x007F) // On 10.7 and 10.8 only // CODE_MAP_X11(Power) // not available? -CODE_MAP_ANDROID(Power, 0x0074) // CODE_MAP_WIN(Sleep) // not available? // CODE_MAP_X11(Sleep) // not available? -CODE_MAP_ANDROID(Sleep, 0x008E) CODE_MAP_WIN(VolumeDown, 0xE02E) CODE_MAP_MAC(VolumeDown, kVK_VolumeDown) // not available? CODE_MAP_X11(VolumeDown, 0x007A) -CODE_MAP_ANDROID(VolumeDown, 0x0072) CODE_MAP_WIN(VolumeMute, 0xE020) CODE_MAP_MAC(VolumeMute, kVK_Mute) // not available? CODE_MAP_X11(VolumeMute, 0x0079) -CODE_MAP_ANDROID(VolumeMute, 0x0071) CODE_MAP_WIN(VolumeUp, 0xE030) CODE_MAP_MAC(VolumeUp, kVK_VolumeUp) // not available? CODE_MAP_X11(VolumeUp, 0x007B) -CODE_MAP_ANDROID(VolumeUp, 0x0073) // side of body, not on keyboard // CODE_MAP_WIN(WakeUp) // not available? CODE_MAP_X11(WakeUp, 0x0097) -CODE_MAP_ANDROID(WakeUp, 0x008F) // Legacy editing keys CODE_MAP_X11(Again, 0x0089) // Again key on Sun keyboard -CODE_MAP_ANDROID(Again, 0x0081) // Again key on Sun keyboard CODE_MAP_X11(Copy, 0x008D) // Copy key on Sun keyboard -CODE_MAP_ANDROID(Copy, 0x0085) // Copy key on Sun keyboard CODE_MAP_X11(Cut, 0x0091) // Cut key on Sun keyboard -CODE_MAP_ANDROID(Cut, 0x0089) // Cut key on Sun keyboard CODE_MAP_X11(Find, 0x0090) // Find key on Sun keyboard -CODE_MAP_ANDROID(Find, 0x0088) // Find key on Sun keyboard CODE_MAP_X11(Open, 0x008E) // Open key on Sun keyboard -CODE_MAP_ANDROID(Open, 0x0086) // Open key on Sun keyboard CODE_MAP_X11(Paste, 0x008F) // Paste key on Sun keyboard -CODE_MAP_ANDROID(Paste, 0x0087) // Paste key on Sun keyboard CODE_MAP_X11(Props, 0x008A) // Props key on Sun keyboard -CODE_MAP_ANDROID(Props, 0x0082) // Props key on Sun keyboard CODE_MAP_X11(Select, 0x008C) // Front key on Sun keyboard -CODE_MAP_ANDROID(Select, 0x0084) // Front key on Sun keyboard CODE_MAP_X11(Undo, 0x008B) // Undo key on Sun keyboard -CODE_MAP_ANDROID(Undo, 0x0083) // Undo key on Sun keyboard #undef CODE_MAP_WIN #undef CODE_MAP_MAC #undef CODE_MAP_X11 -#undef CODE_MAP_ANDROID diff --git a/widget/NativeKeyToDOMKeyName.h b/widget/NativeKeyToDOMKeyName.h index a818108db..ce1e3c3a4 100644 --- a/widget/NativeKeyToDOMKeyName.h +++ b/widget/NativeKeyToDOMKeyName.h @@ -25,7 +25,6 @@ #define KEY_MAP_COCOA(aCPPKeyName, aNativeKey) // GTK #define KEY_MAP_GTK(aCPPKeyName, aNativeKey) -#define KEY_MAP_ANDROID(aCPPKeyName, aNativeKey) #if defined(XP_WIN) #if defined(NS_NATIVE_KEY_TO_DOM_KEY_NAME_INDEX) @@ -71,10 +70,6 @@ #undef KEY_MAP_GTK #define KEY_MAP_GTK(aCPPKeyName, aNativeKey) \ NS_NATIVE_KEY_TO_DOM_KEY_NAME_INDEX(aNativeKey, KEY_NAME_INDEX_##aCPPKeyName) -#elif defined(ANDROID) -#undef KEY_MAP_ANDROID -#define KEY_MAP_ANDROID(aCPPKeyName, aNativeKey) \ - NS_NATIVE_KEY_TO_DOM_KEY_NAME_INDEX(aNativeKey, KEY_NAME_INDEX_##aCPPKeyName) #endif /****************************************************************************** @@ -88,8 +83,6 @@ KEY_MAP_COCOA (Alt, kVK_Option) KEY_MAP_COCOA (Alt, kVK_RightOption) KEY_MAP_GTK (Alt, GDK_Alt_L) KEY_MAP_GTK (Alt, GDK_Alt_R) -KEY_MAP_ANDROID (Alt, AKEYCODE_ALT_LEFT) -KEY_MAP_ANDROID (Alt, AKEYCODE_ALT_RIGHT) // AltGraph KEY_MAP_GTK (AltGraph, GDK_Mode_switch /* same as GDK_kana_switch, @@ -109,7 +102,6 @@ KEY_MAP_GTK (AltGraph, GDK_ISO_Level5_Lock) KEY_MAP_WIN (CapsLock, VK_CAPITAL) KEY_MAP_COCOA (CapsLock, kVK_CapsLock) KEY_MAP_GTK (CapsLock, GDK_Caps_Lock) -KEY_MAP_ANDROID (CapsLock, AKEYCODE_CAPS_LOCK) // Control KEY_MAP_WIN (Control, VK_CONTROL) @@ -119,25 +111,19 @@ KEY_MAP_COCOA (Control, kVK_Control) KEY_MAP_COCOA (Control, kVK_RightControl) KEY_MAP_GTK (Control, GDK_Control_L) KEY_MAP_GTK (Control, GDK_Control_R) -KEY_MAP_ANDROID (Control, AKEYCODE_CTRL_LEFT) -KEY_MAP_ANDROID (Control, AKEYCODE_CTRL_RIGHT) // Fn KEY_MAP_COCOA (Fn, kVK_Function) -KEY_MAP_ANDROID (Fn, AKEYCODE_FUNCTION) // Meta KEY_MAP_COCOA (Meta, kVK_Command) KEY_MAP_COCOA (Meta, kVK_RightCommand) KEY_MAP_GTK (Meta, GDK_Meta_L) KEY_MAP_GTK (Meta, GDK_Meta_R) -KEY_MAP_ANDROID (Meta, AKEYCODE_META_LEFT) -KEY_MAP_ANDROID (Meta, AKEYCODE_META_RIGHT) // NumLock KEY_MAP_WIN (NumLock, VK_NUMLOCK) KEY_MAP_GTK (NumLock, GDK_Num_Lock) -KEY_MAP_ANDROID (NumLock, AKEYCODE_NUM_LOCK) // OS KEY_MAP_WIN (OS, VK_LWIN) @@ -150,7 +136,6 @@ KEY_MAP_GTK (OS, GDK_Hyper_R) // ScrollLock KEY_MAP_WIN (ScrollLock, VK_SCROLL) KEY_MAP_GTK (ScrollLock, GDK_Scroll_Lock) -KEY_MAP_ANDROID (ScrollLock, AKEYCODE_SCROLL_LOCK) // Shift KEY_MAP_WIN (Shift, VK_SHIFT) @@ -161,11 +146,8 @@ KEY_MAP_COCOA (Shift, kVK_RightShift) KEY_MAP_GTK (Shift, GDK_Shift_L) KEY_MAP_GTK (Shift, GDK_Shift_R) KEY_MAP_GTK (Shift, GDK_Shift_Lock) // Let's treat as Shift key (bug 769159) -KEY_MAP_ANDROID (Shift, AKEYCODE_SHIFT_LEFT) -KEY_MAP_ANDROID (Shift, AKEYCODE_SHIFT_RIGHT) // Symbol -KEY_MAP_ANDROID (Symbol, AKEYCODE_SYM) /****************************************************************************** * Whitespace Keys @@ -179,8 +161,6 @@ KEY_MAP_GTK (Enter, GDK_Return) KEY_MAP_GTK (Enter, GDK_KP_Enter) KEY_MAP_GTK (Enter, GDK_ISO_Enter) KEY_MAP_GTK (Enter, GDK_3270_Enter) -KEY_MAP_ANDROID (Enter, AKEYCODE_ENTER) -KEY_MAP_ANDROID (Enter, AKEYCODE_NUMPAD_ENTER) // Tab KEY_MAP_WIN (Tab, VK_TAB) @@ -188,7 +168,6 @@ KEY_MAP_COCOA (Tab, kVK_Tab) KEY_MAP_GTK (Tab, GDK_Tab) KEY_MAP_GTK (Tab, GDK_ISO_Left_Tab) // Shift+Tab KEY_MAP_GTK (Tab, GDK_KP_Tab) -KEY_MAP_ANDROID (Tab, AKEYCODE_TAB) /****************************************************************************** * Navigation Keys @@ -198,56 +177,48 @@ KEY_MAP_WIN (ArrowDown, VK_DOWN) KEY_MAP_COCOA (ArrowDown, kVK_DownArrow) KEY_MAP_GTK (ArrowDown, GDK_Down) KEY_MAP_GTK (ArrowDown, GDK_KP_Down) -KEY_MAP_ANDROID (ArrowDown, AKEYCODE_DPAD_DOWN) // ArrowLeft KEY_MAP_WIN (ArrowLeft, VK_LEFT) KEY_MAP_COCOA (ArrowLeft, kVK_LeftArrow) KEY_MAP_GTK (ArrowLeft, GDK_Left) KEY_MAP_GTK (ArrowLeft, GDK_KP_Left) -KEY_MAP_ANDROID (ArrowLeft, AKEYCODE_DPAD_LEFT) // ArrowRight KEY_MAP_WIN (ArrowRight, VK_RIGHT) KEY_MAP_COCOA (ArrowRight, kVK_RightArrow) KEY_MAP_GTK (ArrowRight, GDK_Right) KEY_MAP_GTK (ArrowRight, GDK_KP_Right) -KEY_MAP_ANDROID (ArrowRight, AKEYCODE_DPAD_RIGHT) // ArrowUp KEY_MAP_WIN (ArrowUp, VK_UP) KEY_MAP_COCOA (ArrowUp, kVK_UpArrow) KEY_MAP_GTK (ArrowUp, GDK_Up) KEY_MAP_GTK (ArrowUp, GDK_KP_Up) -KEY_MAP_ANDROID (ArrowUp, AKEYCODE_DPAD_UP) // End KEY_MAP_WIN (End, VK_END) KEY_MAP_COCOA (End, kVK_End) KEY_MAP_GTK (End, GDK_End) KEY_MAP_GTK (End, GDK_KP_End) -KEY_MAP_ANDROID (End, AKEYCODE_MOVE_END) // Home KEY_MAP_WIN (Home, VK_HOME) KEY_MAP_COCOA (Home, kVK_Home) KEY_MAP_GTK (Home, GDK_Home) KEY_MAP_GTK (Home, GDK_KP_Home) -KEY_MAP_ANDROID (Home, AKEYCODE_MOVE_HOME) // PageDown KEY_MAP_WIN (PageDown, VK_NEXT) KEY_MAP_COCOA (PageDown, kVK_PageDown) KEY_MAP_GTK (PageDown, GDK_Page_Down /* same as GDK_Next */) KEY_MAP_GTK (PageDown, GDK_KP_Page_Down /* same as GDK_KP_Next */) -KEY_MAP_ANDROID (PageDown, AKEYCODE_PAGE_DOWN) // PageUp KEY_MAP_WIN (PageUp, VK_PRIOR) KEY_MAP_COCOA (PageUp, kVK_PageUp) KEY_MAP_GTK (PageUp, GDK_Page_Up /* same as GDK_Prior */) KEY_MAP_GTK (PageUp, GDK_KP_Page_Up /* same as GDK_KP_Prior */) -KEY_MAP_ANDROID (PageUp, AKEYCODE_PAGE_UP) /****************************************************************************** * Editing Keys @@ -256,14 +227,12 @@ KEY_MAP_ANDROID (PageUp, AKEYCODE_PAGE_UP) KEY_MAP_WIN (Backspace, VK_BACK) KEY_MAP_COCOA (Backspace, kVK_PC_Backspace) KEY_MAP_GTK (Backspace, GDK_BackSpace) -KEY_MAP_ANDROID (Backspace, AKEYCODE_DEL) // Clear KEY_MAP_WIN (Clear, VK_CLEAR) KEY_MAP_WIN (Clear, VK_OEM_CLEAR) KEY_MAP_COCOA (Clear, kVK_ANSI_KeypadClear) KEY_MAP_GTK (Clear, GDK_Clear) -KEY_MAP_ANDROID (Clear, AKEYCODE_CLEAR) // Copy KEY_MAP_WIN_CMD (Copy, APPCOMMAND_COPY) @@ -282,7 +251,6 @@ KEY_MAP_WIN (Delete, VK_DELETE) KEY_MAP_COCOA (Delete, kVK_PC_Delete) KEY_MAP_GTK (Delete, GDK_Delete) KEY_MAP_GTK (Delete, GDK_KP_Delete) -KEY_MAP_ANDROID (Delete, AKEYCODE_FORWARD_DEL) // EraseEof KEY_MAP_WIN (EraseEof, VK_EREOF) @@ -296,7 +264,6 @@ KEY_MAP_GTK (ExSel, GDK_3270_ExSelect) // legacy IBM keyboard layout KEY_MAP_WIN (Insert, VK_INSERT) KEY_MAP_GTK (Insert, GDK_Insert) KEY_MAP_GTK (Insert, GDK_KP_Insert) -KEY_MAP_ANDROID (Insert, AKEYCODE_INSERT) // Paste KEY_MAP_WIN_CMD (Paste, APPCOMMAND_PASTE) @@ -315,7 +282,6 @@ KEY_MAP_GTK (Undo, GDK_Undo) ******************************************************************************/ // Accept KEY_MAP_WIN (Accept, VK_ACCEPT) -KEY_MAP_ANDROID (Accept, AKEYCODE_DPAD_CENTER) // Attn KEY_MAP_WIN_OTH (Attn, VK_ATTN) // not valid with Japanese keyboard layout @@ -329,13 +295,11 @@ KEY_MAP_GTK (Cancel, GDK_Cancel) KEY_MAP_WIN (ContextMenu, VK_APPS) KEY_MAP_COCOA (ContextMenu, kVK_PC_ContextMenu) KEY_MAP_GTK (ContextMenu, GDK_Menu) -KEY_MAP_ANDROID (ContextMenu, AKEYCODE_MENU) // Escape KEY_MAP_WIN (Escape, VK_ESCAPE) KEY_MAP_COCOA (Escape, kVK_Escape) KEY_MAP_GTK (Escape, GDK_Escape) -KEY_MAP_ANDROID (Escape, AKEYCODE_ESCAPE) // Execute KEY_MAP_WIN (Execute, VK_EXECUTE) @@ -350,14 +314,12 @@ KEY_MAP_WIN (Help, VK_HELP) KEY_MAP_WIN_CMD (Help, APPCOMMAND_HELP) KEY_MAP_COCOA (Help, kVK_Help) KEY_MAP_GTK (Help, GDK_Help) -KEY_MAP_ANDROID (Help, AKEYCODE_ASSIST) // Pause KEY_MAP_WIN (Pause, VK_PAUSE) KEY_MAP_GTK (Pause, GDK_Pause) // Break is typically mapped to Alt+Pause or Ctrl+Pause on GTK. KEY_MAP_GTK (Pause, GDK_Break) -KEY_MAP_ANDROID (Pause, AKEYCODE_BREAK) // Play KEY_MAP_WIN (Play, VK_PLAY) @@ -369,11 +331,9 @@ KEY_MAP_GTK (Select, GDK_Select) // ZoomIn KEY_MAP_GTK (ZoomIn, GDK_ZoomIn) -KEY_MAP_ANDROID (ZoomIn, AKEYCODE_ZOOM_IN) // ZoomOut KEY_MAP_GTK (ZoomOut, GDK_ZoomOut) -KEY_MAP_ANDROID (ZoomOut, AKEYCODE_ZOOM_OUT) /****************************************************************************** * Device Keys @@ -386,13 +346,11 @@ KEY_MAP_GTK (BrightnessUp, GDK_MonBrightnessUp) // Eject KEY_MAP_GTK (Eject, GDK_Eject) -KEY_MAP_ANDROID (Eject, AKEYCODE_MEDIA_EJECT) // LogOff KEY_MAP_GTK (LogOff, GDK_LogOff) // Power -KEY_MAP_ANDROID (Power, AKEYCODE_POWER) // PowerOff KEY_MAP_GTK (PowerOff, GDK_PowerDown) @@ -403,7 +361,6 @@ KEY_MAP_WIN (PrintScreen, VK_SNAPSHOT) KEY_MAP_GTK (PrintScreen, GDK_3270_PrintScreen) KEY_MAP_GTK (PrintScreen, GDK_Print) KEY_MAP_GTK (PrintScreen, GDK_Sys_Req) -KEY_MAP_ANDROID (PrintScreen, AKEYCODE_SYSRQ) // Hibernate KEY_MAP_GTK (Hibernate, GDK_Hibernate) @@ -437,7 +394,6 @@ KEY_MAP_GTK (Compose, GDK_Multi_key) // "Multi Key" is "Compose key" on X // Convert KEY_MAP_WIN (Convert, VK_CONVERT) KEY_MAP_GTK (Convert, GDK_Henkan) -KEY_MAP_ANDROID (Convert, AKEYCODE_HENKAN) // Dead KEY_MAP_GTK (Dead, GDK_dead_grave) @@ -497,19 +453,16 @@ KEY_MAP_GTK (GroupLast, GDK_ISO_Last_Group) // GroupNext KEY_MAP_GTK (GroupNext, GDK_ISO_Next_Group) -KEY_MAP_ANDROID (GroupNext, AKEYCODE_LANGUAGE_SWITCH) // GroupPrevious KEY_MAP_GTK (GroupPrevious, GDK_ISO_Prev_Group) // ModeChange KEY_MAP_WIN (ModeChange, VK_MODECHANGE) -KEY_MAP_ANDROID (ModeChange, AKEYCODE_SWITCH_CHARSET) // NonConvert KEY_MAP_WIN (NonConvert, VK_NONCONVERT) KEY_MAP_GTK (NonConvert, GDK_Muhenkan) -KEY_MAP_ANDROID (NonConvert, AKEYCODE_MUHENKAN) // PreviousCandidate KEY_MAP_GTK (PreviousCandidate, GDK_PreviousCandidate) // OADG 109, Mae Koho @@ -534,7 +487,6 @@ KEY_MAP_WIN (JunjaMode, VK_JUNJA) ******************************************************************************/ // Eisu KEY_MAP_COCOA (Eisu, kVK_JIS_Eisu) -KEY_MAP_ANDROID (Eisu, AKEYCODE_EISU) // Hankaku KEY_MAP_WIN_JPN (Hankaku, VK_OEM_AUTO) @@ -546,7 +498,6 @@ KEY_MAP_GTK (Hiragana, GDK_Hiragana) // HiraganaKatakana KEY_MAP_GTK (HiraganaKatakana, GDK_Hiragana_Katakana) -KEY_MAP_ANDROID (HiraganaKatakana, AKEYCODE_KATAKANA_HIRAGANA) // KanaMode // VK_KANA is never used with modern Japanese keyboard, however, IE maps it to @@ -560,8 +511,6 @@ KEY_MAP_GTK (KanaMode, GDK_Kana_Shift) KEY_MAP_WIN_JPN (KanjiMode, VK_KANJI /* same as VK_HANJA */) KEY_MAP_COCOA (KanjiMode, kVK_JIS_Kana) // Kana key opens IME KEY_MAP_GTK (KanjiMode, GDK_Kanji) // Typically, Alt + Hankaku/Zenkaku key -// Assuming that KANA key of Android is the Kana key on Mac keyboard. -KEY_MAP_ANDROID (KanjiMode, AKEYCODE_KANA) // Katakana KEY_MAP_WIN_JPN (Katakana, VK_OEM_FINISH) @@ -577,7 +526,6 @@ KEY_MAP_GTK (Zenkaku, GDK_Zenkaku) // ZenkakuHankaku KEY_MAP_GTK (ZenkakuHankaku, GDK_Zenkaku_Hankaku) -KEY_MAP_ANDROID (ZenkakuHankaku, AKEYCODE_ZENKAKU_HANKAKU) /****************************************************************************** * General-Purpose Function Keys @@ -587,76 +535,64 @@ KEY_MAP_WIN (F1, VK_F1) KEY_MAP_COCOA (F1, kVK_F1) KEY_MAP_GTK (F1, GDK_F1) KEY_MAP_GTK (F1, GDK_KP_F1) -KEY_MAP_ANDROID (F1, AKEYCODE_F1) // F2 KEY_MAP_WIN (F2, VK_F2) KEY_MAP_COCOA (F2, kVK_F2) KEY_MAP_GTK (F2, GDK_F2) KEY_MAP_GTK (F2, GDK_KP_F2) -KEY_MAP_ANDROID (F2, AKEYCODE_F2) // F3 KEY_MAP_WIN (F3, VK_F3) KEY_MAP_COCOA (F3, kVK_F3) KEY_MAP_GTK (F3, GDK_F3) KEY_MAP_GTK (F3, GDK_KP_F3) -KEY_MAP_ANDROID (F3, AKEYCODE_F3) // F4 KEY_MAP_WIN (F4, VK_F4) KEY_MAP_COCOA (F4, kVK_F4) KEY_MAP_GTK (F4, GDK_F4) KEY_MAP_GTK (F4, GDK_KP_F4) -KEY_MAP_ANDROID (F4, AKEYCODE_F4) // F5 KEY_MAP_WIN (F5, VK_F5) KEY_MAP_COCOA (F5, kVK_F5) KEY_MAP_GTK (F5, GDK_F5) -KEY_MAP_ANDROID (F5, AKEYCODE_F5) // F6 KEY_MAP_WIN (F6, VK_F6) KEY_MAP_COCOA (F6, kVK_F6) KEY_MAP_GTK (F6, GDK_F6) -KEY_MAP_ANDROID (F6, AKEYCODE_F6) // F7 KEY_MAP_WIN (F7, VK_F7) KEY_MAP_COCOA (F7, kVK_F7) KEY_MAP_GTK (F7, GDK_F7) -KEY_MAP_ANDROID (F7, AKEYCODE_F7) // F8 KEY_MAP_WIN (F8, VK_F8) KEY_MAP_COCOA (F8, kVK_F8) KEY_MAP_GTK (F8, GDK_F8) -KEY_MAP_ANDROID (F8, AKEYCODE_F8) // F9 KEY_MAP_WIN (F9, VK_F9) KEY_MAP_COCOA (F9, kVK_F9) KEY_MAP_GTK (F9, GDK_F9) -KEY_MAP_ANDROID (F9, AKEYCODE_F9) // F10 KEY_MAP_WIN (F10, VK_F10) KEY_MAP_COCOA (F10, kVK_F10) KEY_MAP_GTK (F10, GDK_F10) -KEY_MAP_ANDROID (F10, AKEYCODE_F10) // F11 KEY_MAP_WIN (F11, VK_F11) KEY_MAP_COCOA (F11, kVK_F11) KEY_MAP_GTK (F11, GDK_F11 /* same as GDK_L1 */) -KEY_MAP_ANDROID (F11, AKEYCODE_F11) // F12 KEY_MAP_WIN (F12, VK_F12) KEY_MAP_COCOA (F12, kVK_F12) KEY_MAP_GTK (F12, GDK_F12 /* same as GDK_L2 */) -KEY_MAP_ANDROID (F12, AKEYCODE_F12) // F13 KEY_MAP_WIN (F13, VK_F13) @@ -751,11 +687,9 @@ KEY_MAP_GTK (F35, GDK_F35 /* same as GDK_R15 */) ******************************************************************************/ // ChannelDown KEY_MAP_WIN_CMD (ChannelDown, APPCOMMAND_MEDIA_CHANNEL_DOWN) -KEY_MAP_ANDROID (ChannelDown, AKEYCODE_CHANNEL_DOWN) // ChannelUp KEY_MAP_WIN_CMD (ChannelUp, APPCOMMAND_MEDIA_CHANNEL_UP) -KEY_MAP_ANDROID (ChannelUp, AKEYCODE_CHANNEL_UP) // Close // NOTE: This is not a key to close disk tray, this is a key to close document @@ -778,45 +712,37 @@ KEY_MAP_GTK (MailSend, GDK_Send) // MediaPause KEY_MAP_WIN_CMD (MediaPause, APPCOMMAND_MEDIA_PAUSE) KEY_MAP_GTK (MediaPause, GDK_AudioPause) -KEY_MAP_ANDROID (MediaPause, AKEYCODE_MEDIA_PAUSE) // MediaPlay KEY_MAP_WIN_CMD (MediaPlay, APPCOMMAND_MEDIA_PLAY) KEY_MAP_GTK (MediaPlay, GDK_AudioPlay) -KEY_MAP_ANDROID (MediaPlay, AKEYCODE_MEDIA_PLAY) // MediaPlayPause KEY_MAP_WIN (MediaPlayPause, VK_MEDIA_PLAY_PAUSE) KEY_MAP_WIN_CMD (MediaPlayPause, APPCOMMAND_MEDIA_PLAY_PAUSE) -KEY_MAP_ANDROID (MediaPlayPause, AKEYCODE_MEDIA_PLAY_PAUSE) // MediaRecord KEY_MAP_WIN_CMD (MediaRecord, APPCOMMAND_MEDIA_RECORD) KEY_MAP_GTK (MediaRecord, GDK_AudioRecord) -KEY_MAP_ANDROID (MediaRecord, AKEYCODE_MEDIA_RECORD) // MediaRewind KEY_MAP_WIN_CMD (MediaRewind, APPCOMMAND_MEDIA_REWIND) KEY_MAP_GTK (MediaRewind, GDK_AudioRewind) -KEY_MAP_ANDROID (MediaRewind, AKEYCODE_MEDIA_REWIND) // MediaStop KEY_MAP_WIN (MediaStop, VK_MEDIA_STOP) KEY_MAP_WIN_CMD (MediaStop, APPCOMMAND_MEDIA_STOP) KEY_MAP_GTK (MediaStop, GDK_AudioStop) -KEY_MAP_ANDROID (MediaStop, AKEYCODE_MEDIA_STOP) // MediaTrackNext KEY_MAP_WIN (MediaTrackNext, VK_MEDIA_NEXT_TRACK) KEY_MAP_WIN_CMD (MediaTrackNext, APPCOMMAND_MEDIA_NEXTTRACK) KEY_MAP_GTK (MediaTrackNext, GDK_AudioNext) -KEY_MAP_ANDROID (MediaTrackNext, AKEYCODE_MEDIA_NEXT) // MediaTrackPrevious KEY_MAP_WIN (MediaTrackPrevious, VK_MEDIA_PREV_TRACK) KEY_MAP_WIN_CMD (MediaTrackPrevious, APPCOMMAND_MEDIA_PREVIOUSTRACK) KEY_MAP_GTK (MediaTrackPrevious, GDK_AudioPrev) -KEY_MAP_ANDROID (MediaTrackPrevious, AKEYCODE_MEDIA_PREVIOUS) // New KEY_MAP_WIN_CMD (New, APPCOMMAND_NEW) @@ -851,38 +777,32 @@ KEY_MAP_WIN (AudioVolumeDown, VK_VOLUME_DOWN) KEY_MAP_WIN_CMD (AudioVolumeDown, APPCOMMAND_VOLUME_DOWN) KEY_MAP_COCOA (AudioVolumeDown, kVK_VolumeDown) KEY_MAP_GTK (AudioVolumeDown, GDK_AudioLowerVolume) -KEY_MAP_ANDROID (AudioVolumeDown, AKEYCODE_VOLUME_DOWN) // AudioVolumeUp KEY_MAP_WIN (AudioVolumeUp, VK_VOLUME_UP) KEY_MAP_WIN_CMD (AudioVolumeUp, APPCOMMAND_VOLUME_UP) KEY_MAP_COCOA (AudioVolumeUp, kVK_VolumeUp) KEY_MAP_GTK (AudioVolumeUp, GDK_AudioRaiseVolume) -KEY_MAP_ANDROID (AudioVolumeUp, AKEYCODE_VOLUME_UP) // AudioVolumeMute KEY_MAP_WIN (AudioVolumeMute, VK_VOLUME_MUTE) KEY_MAP_WIN_CMD (AudioVolumeMute, APPCOMMAND_VOLUME_MUTE) KEY_MAP_COCOA (AudioVolumeMute, kVK_Mute) KEY_MAP_GTK (AudioVolumeMute, GDK_AudioMute) -KEY_MAP_ANDROID (AudioVolumeMute, AKEYCODE_VOLUME_MUTE) /****************************************************************************** * Application Keys ******************************************************************************/ // LaunchCalculator KEY_MAP_GTK (LaunchCalculator, GDK_Calculator) -KEY_MAP_ANDROID (LaunchCalculator, AKEYCODE_CALCULATOR) // LaunchCalendar KEY_MAP_GTK (LaunchCalendar, GDK_Calendar) -KEY_MAP_ANDROID (LaunchCalendar, AKEYCODE_CALENDAR) // LaunchMail KEY_MAP_WIN (LaunchMail, VK_LAUNCH_MAIL) KEY_MAP_WIN_CMD (LaunchMail, APPCOMMAND_LAUNCH_MAIL) KEY_MAP_GTK (LaunchMail, GDK_Mail) -KEY_MAP_ANDROID (LaunchMail, AKEYCODE_ENVELOPE) // LaunchMediaPlayer KEY_MAP_WIN (LaunchMediaPlayer, VK_LAUNCH_MEDIA_SELECT) @@ -895,7 +815,6 @@ KEY_MAP_GTK (LaunchMediaPlayer, GDK_AudioMedia) // LaunchMusicPlayer KEY_MAP_GTK (LaunchMusicPlayer, GDK_Music) -KEY_MAP_ANDROID (LaunchMusicPlayer, AKEYCODE_MUSIC) // LaunchMyComputer KEY_MAP_GTK (LaunchMyComputer, GDK_MyComputer) @@ -909,7 +828,6 @@ KEY_MAP_GTK (LaunchSpreadsheet, GDK_Excel) // LaunchWebBrowser KEY_MAP_GTK (LaunchWebBrowser, GDK_WWW) -KEY_MAP_ANDROID (LaunchWebBrowser, AKEYCODE_EXPLORER) // LaunchWebCam KEY_MAP_GTK (LaunchWebCam, GDK_WebCam) @@ -980,18 +898,15 @@ KEY_MAP_GTK (LaunchApplication16, GDK_LaunchF) KEY_MAP_WIN (BrowserBack, VK_BROWSER_BACK) KEY_MAP_WIN_CMD (BrowserBack, APPCOMMAND_BROWSER_BACKWARD) KEY_MAP_GTK (BrowserBack, GDK_Back) -KEY_MAP_ANDROID (BrowserBack, AKEYCODE_BACK) // BrowserFavorites KEY_MAP_WIN (BrowserFavorites, VK_BROWSER_FAVORITES) KEY_MAP_WIN_CMD (BrowserFavorites, APPCOMMAND_BROWSER_FAVORITES) -KEY_MAP_ANDROID (BrowserFavorites, AKEYCODE_BOOKMARK) // BrowserForward KEY_MAP_WIN (BrowserForward, VK_BROWSER_FORWARD) KEY_MAP_WIN_CMD (BrowserForward, APPCOMMAND_BROWSER_FORWARD) KEY_MAP_GTK (BrowserForward, GDK_Forward) -KEY_MAP_ANDROID (BrowserForward, AKEYCODE_FORWARD) // BrowserHome KEY_MAP_WIN (BrowserHome, VK_BROWSER_HOME) @@ -1008,7 +923,6 @@ KEY_MAP_GTK (BrowserRefresh, GDK_Reload) KEY_MAP_WIN (BrowserSearch, VK_BROWSER_SEARCH) KEY_MAP_WIN_CMD (BrowserSearch, APPCOMMAND_BROWSER_SEARCH) KEY_MAP_GTK (BrowserSearch, GDK_Search) -KEY_MAP_ANDROID (BrowserSearch, AKEYCODE_SEARCH) // BrowserStop KEY_MAP_WIN (BrowserStop, VK_BROWSER_STOP) @@ -1019,88 +933,67 @@ KEY_MAP_GTK (BrowserStop, GDK_Stop) * Mobile Phone Keys ******************************************************************************/ // Call -KEY_MAP_ANDROID (Call, AKEYCODE_CALL) // Camera -KEY_MAP_ANDROID (Camera, AKEYCODE_CAMERA) // CameraFocus -KEY_MAP_ANDROID (CameraFocus, AKEYCODE_FOCUS) // GoHome -KEY_MAP_ANDROID (GoHome, AKEYCODE_HOME) /****************************************************************************** * TV Keys ******************************************************************************/ // TV -KEY_MAP_ANDROID (TV, AKEYCODE_TV) // TVInput -KEY_MAP_ANDROID (TVInput, AKEYCODE_TV_INPUT) // TVPower -KEY_MAP_ANDROID (TVPower, AKEYCODE_TV_POWER) /****************************************************************************** * Media Controller Keys ******************************************************************************/ // AVRInput -KEY_MAP_ANDROID (AVRInput, AKEYCODE_AVR_INPUT) // AVRPower -KEY_MAP_ANDROID (AVRPower, AKEYCODE_AVR_POWER) // ColorF0Red KEY_MAP_GTK (ColorF0Red, GDK_Red) -KEY_MAP_ANDROID (ColorF0Red, AKEYCODE_PROG_RED) // ColorF1Green KEY_MAP_GTK (ColorF1Green, GDK_Green) -KEY_MAP_ANDROID (ColorF1Green, AKEYCODE_PROG_GREEN) // ColorF2Yellow KEY_MAP_GTK (ColorF2Yellow, GDK_Yellow) -KEY_MAP_ANDROID (ColorF2Yellow, AKEYCODE_PROG_YELLOW) // ColorF3Blue KEY_MAP_GTK (ColorF3Blue, GDK_Blue) -KEY_MAP_ANDROID (ColorF3Blue, AKEYCODE_PROG_BLUE) // Dimmer KEY_MAP_GTK (Dimmer, GDK_BrightnessAdjust) // Guide -KEY_MAP_ANDROID (Guide, AKEYCODE_GUIDE) // Info -KEY_MAP_ANDROID (Info, AKEYCODE_INFO) // MediaFastForward KEY_MAP_WIN_CMD (MediaFastForward, APPCOMMAND_MEDIA_FAST_FORWARD) KEY_MAP_GTK (MediaFastForward, GDK_AudioForward) -KEY_MAP_ANDROID (MediaFastForward, AKEYCODE_MEDIA_FAST_FORWARD) // MediaLast // PinPToggle -KEY_MAP_ANDROID (PinPToggle, AKEYCODE_WINDOW) // RandomToggle KEY_MAP_GTK (RandomToggle, GDK_AudioRandomPlay) // Settings -KEY_MAP_ANDROID (Settings, AKEYCODE_SETTINGS) // STBInput -KEY_MAP_ANDROID (STBInput, AKEYCODE_STB_INPUT) // STBPower -KEY_MAP_ANDROID (STBPower, AKEYCODE_STB_POWER) // Subtitle KEY_MAP_GTK (Subtitle, GDK_Subtitle) -KEY_MAP_ANDROID (Subtitle, AKEYCODE_CAPTIONS) // VideoModeNext KEY_MAP_GTK (VideoModeNext, GDK_Next_VMode) @@ -1112,10 +1005,8 @@ KEY_MAP_WIN (ZoomToggle, VK_ZOOM) * Keys not defined by any standards ******************************************************************************/ // SoftLeft -KEY_MAP_ANDROID (SoftLeft, AKEYCODE_SOFT_LEFT) // SoftRight -KEY_MAP_ANDROID (SoftRight, AKEYCODE_SOFT_RIGHT) #undef KEY_MAP_WIN #undef KEY_MAP_WIN_JPN @@ -1124,4 +1015,3 @@ KEY_MAP_ANDROID (SoftRight, AKEYCODE_SOFT_RIGHT) #undef KEY_MAP_WIN_CMD #undef KEY_MAP_COCOA #undef KEY_MAP_GTK -#undef KEY_MAP_ANDROID diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 2d14cc107..8e28c24da 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -134,11 +134,6 @@ typedef void* nsNativeWidget; #define NS_NATIVE_COMPOSITOR_DISPLAY 105 #endif // MOZ_X11 #endif -#ifdef MOZ_WIDGET_ANDROID -#define NS_JAVA_SURFACE 100 -#define NS_PRESENTATION_WINDOW 101 -#define NS_PRESENTATION_SURFACE 102 -#endif #define NS_IWIDGET_IID \ { 0x06396bf6, 0x2dd8, 0x45e5, \ diff --git a/widget/nsIdleService.cpp b/widget/nsIdleService.cpp index f9904d39c..5750a2754 100644 --- a/widget/nsIdleService.cpp +++ b/widget/nsIdleService.cpp @@ -21,10 +21,6 @@ #include "mozilla/Telemetry.h" #include <algorithm> -#ifdef MOZ_WIDGET_ANDROID -#include <android/log.h> -#endif - using namespace mozilla; // interval in milliseconds between internal idle time requests. @@ -53,7 +49,6 @@ using namespace mozilla; static PRLogModuleInfo *sLog = nullptr; #define LOG_TAG "GeckoIdleService" -#define LOG_LEVEL ANDROID_LOG_DEBUG // Use this to find previously added observers in our array: class IdleListenerComparator @@ -98,10 +93,6 @@ nsIdleServiceDaily::Observe(nsISupports *, MOZ_LOG(sLog, LogLevel::Debug, ("nsIdleServiceDaily: Notifying idle-daily observers")); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Notifying idle-daily observers"); -#endif // Send the idle-daily observer event nsCOMPtr<nsIObserverService> observerService = @@ -134,10 +125,6 @@ nsIdleServiceDaily::Observe(nsISupports *, MOZ_LOG(sLog, LogLevel::Debug, ("nsIdleServiceDaily: Storing last idle time as %d sec.", nowSec)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Storing last idle time as %d", nowSec); -#endif // Note the moment we expect to get the next timer callback mExpectedTriggerTime = PR_Now() + ((PRTime)SECONDS_PER_DAY * @@ -202,10 +189,6 @@ nsIdleServiceDaily::Init() } else { MOZ_LOG(sLog, LogLevel::Debug, ("nsIdleServiceDaily: Setting timer a day from now")); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Setting timer a day from now"); -#endif // According to our last idle-daily pref, the last idle-daily was fired // less then 24 hours ago. Set a wait for the amount of time remaining. @@ -255,10 +238,7 @@ nsIdleServiceDaily::StageIdleDaily(bool aHasBeenLongWait) MOZ_LOG(sLog, LogLevel::Debug, ("nsIdleServiceDaily: Registering Idle observer callback " "(short wait requested? %d)", aHasBeenLongWait)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Registering Idle observer callback"); -#endif + mIdleDailyTriggerWait = (aHasBeenLongWait ? DAILY_SHORTENED_IDLE_SERVICE_SEC : DAILY_SIGNIFICANT_IDLE_SERVICE_SEC); @@ -271,15 +251,10 @@ nsIdleServiceDaily::DailyCallback(nsITimer* aTimer, void* aClosure) { MOZ_LOG(sLog, LogLevel::Debug, ("nsIdleServiceDaily: DailyCallback running")); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "DailyCallback running"); -#endif nsIdleServiceDaily* self = static_cast<nsIdleServiceDaily*>(aClosure); - // Check to be sure the timer didn't fire early. This currently only - // happens on android. + // Check to be sure the timer didn't fire early. PRTime now = PR_Now(); if (self->mExpectedTriggerTime && now < self->mExpectedTriggerTime) { // Timer returned early, reschedule to the appropriate time. @@ -290,11 +265,6 @@ nsIdleServiceDaily::DailyCallback(nsITimer* aTimer, void* aClosure) MOZ_LOG(sLog, LogLevel::Debug, ("nsIdleServiceDaily: DailyCallback resetting timer to %lld msec", delayTime / PR_USEC_PER_MSEC)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "DailyCallback resetting timer to %lld msec", - delayTime / PR_USEC_PER_MSEC); -#endif (void)self->mTimer->InitWithFuncCallback(DailyCallback, self, @@ -438,11 +408,6 @@ nsIdleService::AddIdleObserver(nsIObserver* aObserver, uint32_t aIdleTimeInS) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: Register idle observer %p for %d seconds", aObserver, aIdleTimeInS)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Register idle observer %p for %d seconds", - aObserver, aIdleTimeInS); -#endif // Put the time + observer in a struct we can keep: IdleListener listener(aObserver, aIdleTimeInS); @@ -466,11 +431,6 @@ nsIdleService::AddIdleObserver(nsIObserver* aObserver, uint32_t aIdleTimeInS) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: Register: adjusting next switch from %d to %d seconds", mDeltaToNextIdleSwitchInS, aIdleTimeInS)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Register: adjusting next switch from %d to %d seconds", - mDeltaToNextIdleSwitchInS, aIdleTimeInS); -#endif mDeltaToNextIdleSwitchInS = aIdleTimeInS; } @@ -508,11 +468,7 @@ nsIdleService::RemoveIdleObserver(nsIObserver* aObserver, uint32_t aTimeInS) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: Remove observer %p (%d seconds), %d remain idle", aObserver, aTimeInS, mIdleObserverCount)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Remove observer %p (%d seconds), %d remain idle", - aObserver, aTimeInS, mIdleObserverCount); -#endif + return NS_OK; } @@ -520,11 +476,7 @@ nsIdleService::RemoveIdleObserver(nsIObserver* aObserver, uint32_t aTimeInS) MOZ_LOG(sLog, LogLevel::Warning, ("idleService: Failed to remove idle observer %p (%d seconds)", aObserver, aTimeInS)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Failed to remove idle observer %p (%d seconds)", - aObserver, aTimeInS); -#endif + return NS_ERROR_FAILURE; } @@ -591,11 +543,7 @@ nsIdleService::ResetIdleTimeOut(uint32_t idleDeltaInMS) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: Reset idle timeout: tell observer %p user is back", notifyList[numberOfPendingNotifications])); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Reset idle timeout: tell observer %p user is back", - notifyList[numberOfPendingNotifications]); -#endif + notifyList[numberOfPendingNotifications]->Observe(this, OBSERVER_TOPIC_ACTIVE, timeStr.get()); @@ -627,11 +575,6 @@ nsIdleService::GetIdleTime(uint32_t* idleTime) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: Get idle time: time since reset %u msec", timeSinceResetInMS)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Get idle time: time since reset %u msec", - timeSinceResetInMS); -#endif // If we did't get pulled data, return the time since last idle reset. if (!polledIdleTimeIsValid) { @@ -682,21 +625,13 @@ nsIdleService::IdleTimerCallback(void) if (NS_FAILED(GetIdleTime(¤tIdleTimeInMS))) { MOZ_LOG(sLog, LogLevel::Info, ("idleService: Idle timer callback: failed to get idle time")); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Idle timer callback: failed to get idle time"); -#endif + return; } MOZ_LOG(sLog, LogLevel::Debug, ("idleService: Idle timer callback: current idle time %u msec", currentIdleTimeInMS)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Idle timer callback: current idle time %u msec", - currentIdleTimeInMS); -#endif // Check if we have had some user interaction we didn't handle previously // we do the calculation in ms to lessen the chance for rounding errors to @@ -770,11 +705,7 @@ nsIdleService::IdleTimerCallback(void) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: **** Idle timer callback: tell observer %p user is idle", notifyList[numberOfPendingNotifications])); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "Idle timer callback: tell observer %p user is idle", - notifyList[numberOfPendingNotifications]); -#endif + notifyList[numberOfPendingNotifications]->Observe(this, OBSERVER_TOPIC_IDLE, timeStr.get()); @@ -790,12 +721,6 @@ nsIdleService::SetTimerExpiryIfBefore(TimeStamp aNextTimeout) ("idleService: SetTimerExpiryIfBefore: next timeout %0.f msec from now", nextTimeoutDuration.ToMilliseconds())); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "SetTimerExpiryIfBefore: next timeout %0.f msec from now", - nextTimeoutDuration.ToMilliseconds()); -#endif - // Bail if we don't have a timer service. if (!mTimer) { return; @@ -824,11 +749,6 @@ nsIdleService::SetTimerExpiryIfBefore(TimeStamp aNextTimeout) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: IdleService reset timer expiry to %0.f msec from now", deltaTime.ToMilliseconds())); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "reset timer expiry to %0.f msec from now", - deltaTime.ToMilliseconds()); -#endif // Start the timer mTimer->InitWithFuncCallback(StaticIdleTimerCallback, @@ -848,10 +768,7 @@ nsIdleService::ReconfigureTimer(void) // And bail out. MOZ_LOG(sLog, LogLevel::Debug, ("idleService: ReconfigureTimer: no idle or waiting observers")); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "ReconfigureTimer: no idle or waiting observers"); -#endif + return; } @@ -870,12 +787,6 @@ nsIdleService::ReconfigureTimer(void) ("idleService: next timeout %0.f msec from now", nextTimeoutDuration.ToMilliseconds())); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "next timeout %0.f msec from now", - nextTimeoutDuration.ToMilliseconds()); -#endif - // Check if we should correct the timeout time because we should poll before. if ((mIdleObserverCount > 0) && UsePollMode()) { TimeStamp pollTimeout = @@ -885,11 +796,7 @@ nsIdleService::ReconfigureTimer(void) MOZ_LOG(sLog, LogLevel::Debug, ("idleService: idle observers, reducing timeout to %lu msec from now", MIN_IDLE_POLL_INTERVAL_MSEC)); -#ifdef MOZ_WIDGET_ANDROID - __android_log_print(LOG_LEVEL, LOG_TAG, - "idle observers, reducing timeout to %lu msec from now", - MIN_IDLE_POLL_INTERVAL_MSEC); -#endif + nextTimeoutAt = pollTimeout; } } |