From 49ed71db425c5054e3ad9526496a7e116c89556b Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Mon, 6 Dec 2010 17:13:33 -0800 Subject: Add support for fallback keycodes. This change enables the framework to synthesize key events to implement default behavior when an application does not handle a key. For example, this change enables numeric keypad keys to perform their associated special function when numlock is off. The application is informed that it is processing a fallback keypress so it can choose to ignore it. Added a new keycode for switching applications. Added ALT key deadkeys. New default key mappings: - ESC -> BACK - Meta+ESC -> HOME - Alt+ESC -> MENU - Meta+Space -> SEARCH - Meta+Tab -> APP_SWITCH Fixed some comments. Fixed some tests. Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe --- data/keyboards/Generic.kcm | 38 +++++++++++++++++++++++------- data/keyboards/Vendor_05ac_Product_0239.kl | 2 +- data/keyboards/Vendor_22b8_Product_093d.kl | 4 ++++ data/keyboards/Virtual.kcm | 38 +++++++++++++++++++++++------- 4 files changed, 63 insertions(+), 19 deletions(-) (limited to 'data/keyboards') diff --git a/data/keyboards/Generic.kcm b/data/keyboards/Generic.kcm index 24b485d..14d7c80 100644 --- a/data/keyboards/Generic.kcm +++ b/data/keyboards/Generic.kcm @@ -42,7 +42,9 @@ key C { label: 'C' base: 'c' shift, capslock: 'C' - ctrl, alt, meta: none + alt: '\u00e7' + shift+alt: '\u00c7' + ctrl, meta: none } key D { @@ -56,7 +58,8 @@ key E { label: 'E' base: 'e' shift, capslock: 'E' - ctrl, alt, meta: none + alt: '\u0301' + ctrl, meta: none } key F { @@ -84,7 +87,8 @@ key I { label: 'I' base: 'i' shift, capslock: 'I' - ctrl, alt, meta: none + alt: '\u0302' + ctrl, meta: none } key J { @@ -119,7 +123,8 @@ key N { label: 'N' base: 'n' shift, capslock: 'N' - ctrl, alt, meta: none + alt: '\u0303' + ctrl, meta: none } key O { @@ -154,7 +159,8 @@ key S { label: 'S' base: 's' shift, capslock: 'S' - ctrl, alt, meta: none + alt: '\u00df' + ctrl, meta: none } key T { @@ -168,7 +174,8 @@ key U { label: 'U' base: 'u' shift, capslock: 'U' - ctrl, alt, meta: none + alt: '\u0308' + ctrl, meta: none } key V { @@ -253,6 +260,7 @@ key 6 { base: '6' shift: '^' ctrl, alt, meta: none + alt+shift: '\u0302' } key 7 { @@ -279,7 +287,8 @@ key 9 { key SPACE { label: ' ' base: ' ' - ctrl, alt, meta: none + ctrl, alt: none + meta: fallback SEARCH } key ENTER { @@ -291,7 +300,8 @@ key ENTER { key TAB { label: '\t' base: '\t' - ctrl, alt, meta: none + ctrl, alt: none + meta: fallback APP_SWITCH } key COMMA { @@ -319,7 +329,9 @@ key GRAVE { label, number: '`' base: '`' shift: '~' - ctrl, alt, meta: none + alt: '\u0300' + alt+shift: '\u0303' + ctrl, meta: none } key MINUS { @@ -525,3 +537,11 @@ key PLUS { label, number: '+' base: '+' } + +### Non-printing keys ### + +key ESCAPE { + base: fallback BACK + meta: fallback HOME + alt: fallback MENU +} diff --git a/data/keyboards/Vendor_05ac_Product_0239.kl b/data/keyboards/Vendor_05ac_Product_0239.kl index 5234d58..6bd3753 100644 --- a/data/keyboards/Vendor_05ac_Product_0239.kl +++ b/data/keyboards/Vendor_05ac_Product_0239.kl @@ -104,7 +104,7 @@ key 111 FORWARD_DEL key 113 VOLUME_MUTE key 114 VOLUME_DOWN key 115 VOLUME_UP -# key 120 switch applications +key 120 APP_SWITCH key 125 META_LEFT key 126 META_RIGHT key 161 MEDIA_EJECT diff --git a/data/keyboards/Vendor_22b8_Product_093d.kl b/data/keyboards/Vendor_22b8_Product_093d.kl index 87b3c32..2749c5b 100644 --- a/data/keyboards/Vendor_22b8_Product_093d.kl +++ b/data/keyboards/Vendor_22b8_Product_093d.kl @@ -12,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# +# Motorola Bluetooth Wireless Keyboard. +# + key 1 BACK key 2 1 key 3 2 diff --git a/data/keyboards/Virtual.kcm b/data/keyboards/Virtual.kcm index 8d3c7ac..0ce4a68 100644 --- a/data/keyboards/Virtual.kcm +++ b/data/keyboards/Virtual.kcm @@ -39,7 +39,9 @@ key C { label: 'C' base: 'c' shift, capslock: 'C' - ctrl, alt, meta: none + alt: '\u00e7' + shift+alt: '\u00c7' + ctrl, meta: none } key D { @@ -53,7 +55,8 @@ key E { label: 'E' base: 'e' shift, capslock: 'E' - ctrl, alt, meta: none + alt: '\u0301' + ctrl, meta: none } key F { @@ -81,7 +84,8 @@ key I { label: 'I' base: 'i' shift, capslock: 'I' - ctrl, alt, meta: none + alt: '\u0302' + ctrl, meta: none } key J { @@ -116,7 +120,8 @@ key N { label: 'N' base: 'n' shift, capslock: 'N' - ctrl, alt, meta: none + alt: '\u0303' + ctrl, meta: none } key O { @@ -151,7 +156,8 @@ key S { label: 'S' base: 's' shift, capslock: 'S' - ctrl, alt, meta: none + alt: '\u00df' + ctrl, meta: none } key T { @@ -165,7 +171,8 @@ key U { label: 'U' base: 'u' shift, capslock: 'U' - ctrl, alt, meta: none + alt: '\u0308' + ctrl, meta: none } key V { @@ -250,6 +257,7 @@ key 6 { base: '6' shift: '^' ctrl, alt, meta: none + alt+shift: '\u0302' } key 7 { @@ -276,7 +284,8 @@ key 9 { key SPACE { label: ' ' base: ' ' - ctrl, alt, meta: none + ctrl, alt: none + meta: fallback SEARCH } key ENTER { @@ -288,7 +297,8 @@ key ENTER { key TAB { label: '\t' base: '\t' - ctrl, alt, meta: none + ctrl, alt: none + meta: fallback APP_SWITCH } key COMMA { @@ -316,7 +326,9 @@ key GRAVE { label, number: '`' base: '`' shift: '~' - ctrl, alt, meta: none + alt: '\u0300' + alt+shift: '\u0303' + ctrl, meta: none } key MINUS { @@ -522,3 +534,11 @@ key PLUS { label, number: '+' base: '+' } + +### Non-printing keys ### + +key ESCAPE { + base: fallback BACK + meta: fallback HOME + alt: fallback MENU +} -- cgit v1.1