diff options
| author | Jules Aguillon | 2024-06-09 13:55:27 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2024-06-09 13:55:27 +0200 |
| commit | 773147ab9c19d49a7958e07c50455204e49a2ecc (patch) | |
| tree | afd13a6446b2d47712d29f4dd1bbaa99cbf971c0 /srcs/juloo.keyboard2/KeyboardData.java | |
| parent | 52805d9745e62e8eafae0051f812f78e3caa2986 (diff) | |
| download | unexpected-keyboard-773147ab9c19d49a7958e07c50455204e49a2ecc.tar.gz unexpected-keyboard-773147ab9c19d49a7958e07c50455204e49a2ecc.zip | |
Automatic placement of f11/f12 placeholders
Diffstat (limited to 'srcs/juloo.keyboard2/KeyboardData.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyboardData.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java index a106e03..225d8cc 100644 --- a/srcs/juloo.keyboard2/KeyboardData.java +++ b/srcs/juloo.keyboard2/KeyboardData.java @@ -608,6 +608,7 @@ public final class KeyboardData /** See [addExtraKeys()]. */ public final static class PreferredPos { + /** Default position for extra keys. */ public static final PreferredPos DEFAULT; public static final PreferredPos ANYWHERE; @@ -622,6 +623,9 @@ public final class KeyboardData public KeyPos[] positions = ANYWHERE_POSITIONS; public PreferredPos() {} + public PreferredPos(KeyValue next_to_) { next_to = next_to_; } + public PreferredPos(KeyPos[] pos) { positions = pos; } + public PreferredPos(KeyValue next_to_, KeyPos[] pos) { next_to = next_to_; positions = pos; } public PreferredPos(PreferredPos src) { @@ -634,13 +638,12 @@ public final class KeyboardData static { - DEFAULT = new PreferredPos(); - DEFAULT.positions = new KeyPos[]{ - new KeyPos(1, -1, 4), - new KeyPos(1, -1, 3), - new KeyPos(2, -1, 2), - new KeyPos(2, -1, 1) - }; + DEFAULT = new PreferredPos(new KeyPos[]{ + new KeyPos(1, -1, 4), + new KeyPos(1, -1, 3), + new KeyPos(2, -1, 2), + new KeyPos(2, -1, 1) + }); ANYWHERE = new PreferredPos(); } } |
