Recapitalize word at cursor with Shift - #2205
Conversation
|
I just tried the dev build and wanted to give feedback: while this is a godsend for typing in German, it makes typing something voluntarily in camelCase practically impossible because you cannot continue appending a capital letter to a word. |
Long press is a great idea! I will implement that. |
Actually, long- press might be not that great thinking about cycling through the capitalization variants (which is absolutely useful), as it incurs multiple delays. A gesture might be a better solution. With the old Swype/Dragon keyboard it was a short swipe gesture from a neighboring key to the shift key. Here, that could be swiping from the numeric switch button to the shift key. |
Alternative solution: detect compound words and apply camelCase to them as a capitalization option |
I'm not the owner of this PR and can't speak for @djurcola, but IMHO that would not be an alternative but another feature altogether (another capitalization style), while this is about just a more convenient way of invoking the already known capitalization. |
|
I am testing a few options:
Currently enjoying 1 and 2 the most. Check my custom build on my profile if you want to try it. https://github.com/djurcola/android-keyboard/actions/runs/31540741039 All the options are under swipe keyboard settings currently, will need to clean that up. |
|
Just tried it. Holding shift works much better than expected thanks to the delay being short enough 👍 |
|
I will remove those from the pull request, I have them since I don't use swiping but do like swipe left to delete! I will adjust the functionality to hold shift as that is what I have used the most. Swipe from shift key was too precise for my fat fingers and I always missed the button. |
|
I would like to propose an alternative implementation that avoids the issue with camelCase altogether. How about when the user types the word "hello" and then presses the shift key while the cursor is still adjacent to the word, Futo simply shows "Hello" in the suggestion bar. And when the user presses shift again, it shows "HELLO" in the suggestion bar. This allows the user to easily capitalize the word without interfering with the typed text or the ability to write camelCase. |
|
My 2 cents: while @EmilJunker 's suggestion would work, it would in most cases double needed key strokes. Think long german combined words, which are mostly nouns, first suggested change is simple capitalizarion. Hold shift = one click and no need to look for the desired variant VS hold shift + select the desired variant = two clicks and felt broken flow. At least unless combined with option suggestion bar mode = 2 alternatives which I strongly dislike! Therefore, I'd rather keep @djurcola 's idea. |
@djurcola once you can fix the swiping conflict I'd be happy to test a new dev build 😊 Then, is there anything one can do to help getting the PR accepted? |
|
Hey Guys, it is pretty hard to get a feature merged here so I am going to leave the current build as is, which has all options available (and able to be toggled on off) for now. I don't think they will approve the hold shift as that is currently mapped to caps. |
|
I'll reopen this to look at when I get around to it but I wasn't very happy about some of the proposed behavior, namely that recapitalizing skips autocorrect. Over the past month I've been occupied with the voice input app so I've not had the chance to review this properly unfortunately. Sorry about the silence. |
|
No worries @abb128 - but the current PR is not suitable for merging, it was just a test of a few different features / options and is a bit of a mess. If there is one method that is preferred (everyone seems to like the hold shift) I can clean it up and update the PR. |
I'd like to note that doing recapitalization without applying autocorrect may well be desired - see example for compound German nouns in here. |
Summary
Fixes #1587
Validation
git diff --checktgis, press Shift once or twice, then Space; the selected casing must remain and the separator must be inserted after it.