mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-25 08:43:24 +01:00
Ensure the layout contain the config key
Without the config key, the user risk being locked in a custom layout that lacks an escape key like 'switch_numpad', 'change_method', etc..
This commit is contained in:
parent
bae82d6ed8
commit
b8e673b614
@ -209,6 +209,9 @@ public final class Config
|
|||||||
// first iteration then automatically added.
|
// first iteration then automatically added.
|
||||||
final Map<KeyValue, KeyboardData.PreferredPos> extra_keys = new HashMap<KeyValue, KeyboardData.PreferredPos>();
|
final Map<KeyValue, KeyboardData.PreferredPos> extra_keys = new HashMap<KeyValue, KeyboardData.PreferredPos>();
|
||||||
final Set<KeyValue> remove_keys = new HashSet<KeyValue>();
|
final Set<KeyValue> remove_keys = new HashSet<KeyValue>();
|
||||||
|
// Make sure the config key is accessible to avoid being locked in a custom
|
||||||
|
// layout.
|
||||||
|
extra_keys.put(KeyValue.getKeyByName("config"), KeyboardData.PreferredPos.ANYWHERE);
|
||||||
extra_keys.putAll(extra_keys_param);
|
extra_keys.putAll(extra_keys_param);
|
||||||
extra_keys.putAll(extra_keys_custom);
|
extra_keys.putAll(extra_keys_custom);
|
||||||
if (extra_keys_subtype != null)
|
if (extra_keys_subtype != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user