-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add toolbar option to toggle Split Keyboard Setting - Enhancement #1218 #1263
Conversation
Thanks, this looks good. Is there a technical reason for split and merge being separate key codes, or could it be changed to a toggle? |
Sounds good. Yes I believe this can be a toggle instead. I will look into updating this week. |
On first glance it looked like it should work, so I wasn't sure why you would take the 2 keycode approach. |
MERGE_LAYOUT Keycode removed and SPLIT_LAYOUT is now a toggle of the SplitKeyboardEnabled Setting |
KeyCode.SWITCH_ONE_HANDED_MODE | ||
KeyCode.SWITCH_ONE_HANDED_MODE, | ||
KeyCode.SPLIT_LAYOUT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary. Currently it does nothing, because DEFAULT
is only accessed by index of ID_TO_NAME
, and you do not add an entry to ID_TO_NAME
.
I recommend to just remove it again and leave KeyboardCodesSet
untouched, as it is only used for the "old" label + code style like a|!code/key_action_previous
, which only exists for historic reasons (I don't want to break people's layouts by removing it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted change, KeyboardCodesSet is no longer modified
The |
app/src/main/java/helium314/keyboard/keyboard/KeyboardSwitcher.java
Outdated
Show resolved
Hide resolved
Could you also set the activation state of the |
I noticed an issue that makes things a little more complicated: the split button does nothing if the screen width is under 600 dp (as per Currently I see 2 ways:
|
Apply suggestions Co-authored-by: Helium314 <[email protected]>
app/src/main/java/helium314/keyboard/keyboard/internal/KeyboardCodesSet.java
Outdated
Show resolved
Hide resolved
…dCodesSet.java Remove KeyCode.SPLIT_LAYOUT
…al settings for split keyboard based upon orientation.
@Helium314 That was difficult... but it works... 🥴 Toggle now controls split layout only for current orientation. There are now two settings options, one for each orientation. |
Thanks for adding this.
Sorry, it was not meant to be some sort of time-wasting exercise. I should have mentioned that you can simply ask me if you have some difficulties. Anyway, could you still adjust the split code a little? Do you think the settings for |
? Math.min(Math.max((displayWidthDp - 600) / 600f + 0.15f, 0.15f), 0.35f) * prefs.getFloat(Settings.PREF_SPLIT_SPACER_SCALE, DEFAULT_SIZE_SCALE) | ||
mSplitKeyboardPortraitSpacerRelativeWidth = mIsSplitKeyboardPortraitEnabled | ||
? Math.min(Math.max((displayWidthDp) / 0.15f, 0.15f), 0.35f) * prefs.getFloat(Settings.PREF_SPLIT_SPACER_SCALE, DEFAULT_SIZE_SCALE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Math.min(Math.max((displayWidthDp) / 0.15f, 0.15f), 0.35f)
is always 0.35
if your display is more than 1 dp wide.
I think the old method should still be used, so users don't have to re-adjust the split width setting.
Enhancement: #1218
Add toolbar option to toggle Split Keyboard Setting.
Screen_recording_20250103_233551.webm