Skip to content

Commit 11b9a68

Browse files
committed
virtualKeyboard.js: Misc fixes.
- Show the suggestion box if *any* sources are ibus-based. This is better than the keyboard size shrinking/growing when the active group changes. - Keep the return key wide, even if there are additional keys in its row. - Fix a couple other key widths.
1 parent ad5c5fd commit 11b9a68

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

js/ui/virtualKeyboard.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ const defaultKeysPost = [
5959
dir_keys],
6060
[[backsp_key, hide_key],
6161
[return_key],
62-
[{ label: '=/<', width: 3, level: 3, right: true, extraClassName: 'non-alpha-key' }],
62+
[{ label: '=/<', width: 1.5, level: 3, right: true, extraClassName: 'non-alpha-key' }],
6363
dir_keys],
6464
[[backsp_key, hide_key],
6565
[return_key],
66-
[{ label: '?123', width: 3, level: 2, right: true, extraClassName: 'non-alpha-key' }],
66+
[{ label: '?123', width: 1.5, level: 2, right: true, extraClassName: 'non-alpha-key' }],
6767
dir_keys],
6868
];
6969

@@ -1095,8 +1095,6 @@ class Keyboard extends St.BoxLayout {
10951095
extraButton.setWidth(1.5);
10961096
} else if (key.right && numKeys > 8) {
10971097
extraButton.setWidth(2);
1098-
} else if (keyval == Clutter.KEY_Return && numKeys > 9) {
1099-
extraButton.setWidth(1.5);
11001098
}
11011099

11021100
layout.appendKey(extraButton, extraButton.keyButton.keyWidth);
@@ -1499,7 +1497,15 @@ var KeyboardController = class {
14991497
}
15001498

15011499
getIbusInputActive() {
1502-
return this._currentSource.type === "ibus";
1500+
let inputSources = this._inputSourceManager.inputSources;
1501+
1502+
for (let i in inputSources) {
1503+
if (inputSources[i].type === "ibus")
1504+
return true;
1505+
}
1506+
1507+
return false;
1508+
}
15031509

15041510
activateNextGroup() {
15051511
let new_index = this._inputSourceManager.currentSource.index + 1;

0 commit comments

Comments
 (0)