Merge "Just ignore settings/shortcut key while typing on tablet"
This commit is contained in:
commit
a042150a69
4 changed files with 8 additions and 4 deletions
|
@ -23,6 +23,7 @@
|
||||||
<integer name="key_tab">9</integer>
|
<integer name="key_tab">9</integer>
|
||||||
<integer name="key_return">10</integer>
|
<integer name="key_return">10</integer>
|
||||||
<integer name="key_space">32</integer>
|
<integer name="key_space">32</integer>
|
||||||
|
<integer name="key_dummy">0</integer>
|
||||||
<integer name="key_shift">-1</integer>
|
<integer name="key_shift">-1</integer>
|
||||||
<integer name="key_switch_alpha_symbol">-2</integer>
|
<integer name="key_switch_alpha_symbol">-2</integer>
|
||||||
<integer name="key_delete">-5</integer>
|
<integer name="key_delete">-5</integer>
|
||||||
|
|
|
@ -78,14 +78,14 @@
|
||||||
latin:code="@integer/key_shortcut"
|
latin:code="@integer/key_shortcut"
|
||||||
latin:keyIcon="iconShortcutKey"
|
latin:keyIcon="iconShortcutKey"
|
||||||
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
||||||
latin:altCode="@integer/key_space"
|
latin:altCode="@integer/key_dummy"
|
||||||
latin:parentStyle="f2PopupStyle" />
|
latin:parentStyle="f2PopupStyle" />
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="settingsKeyStyle"
|
latin:styleName="settingsKeyStyle"
|
||||||
latin:code="@integer/key_settings"
|
latin:code="@integer/key_settings"
|
||||||
latin:keyIcon="iconSettingsKey"
|
latin:keyIcon="iconSettingsKey"
|
||||||
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
||||||
latin:altCode="@integer/key_space"
|
latin:altCode="@integer/key_dummy"
|
||||||
latin:backgroundType="functional" />
|
latin:backgroundType="functional" />
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="tabKeyStyle"
|
latin:styleName="tabKeyStyle"
|
||||||
|
|
|
@ -60,14 +60,14 @@
|
||||||
latin:code="@integer/key_shortcut"
|
latin:code="@integer/key_shortcut"
|
||||||
latin:keyIcon="iconShortcutKey"
|
latin:keyIcon="iconShortcutKey"
|
||||||
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
||||||
latin:altCode="@integer/key_space"
|
latin:altCode="@integer/key_dummy"
|
||||||
latin:backgroundType="functional" />
|
latin:backgroundType="functional" />
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="settingsKeyStyle"
|
latin:styleName="settingsKeyStyle"
|
||||||
latin:code="@integer/key_settings"
|
latin:code="@integer/key_settings"
|
||||||
latin:keyIcon="iconSettingsKey"
|
latin:keyIcon="iconSettingsKey"
|
||||||
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
latin:keyActionFlags="noKeyPreview|altCodeWhileTyping"
|
||||||
latin:altCode="@integer/key_space"
|
latin:altCode="@integer/key_dummy"
|
||||||
latin:backgroundType="functional" />
|
latin:backgroundType="functional" />
|
||||||
<key-style
|
<key-style
|
||||||
latin:styleName="tabKeyStyle"
|
latin:styleName="tabKeyStyle"
|
||||||
|
|
|
@ -151,6 +151,9 @@ public class Keyboard {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Key getKey(int code) {
|
public Key getKey(int code) {
|
||||||
|
if (code == CODE_DUMMY) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final Integer keyCode = code;
|
final Integer keyCode = code;
|
||||||
if (mKeyCache.containsKey(keyCode)) {
|
if (mKeyCache.containsKey(keyCode)) {
|
||||||
return mKeyCache.get(keyCode);
|
return mKeyCache.get(keyCode);
|
||||||
|
|
Loading…
Reference in a new issue