Julow / Unexpected-Keyboard

A lightweight virtual keyboard for developers.
GNU General Public License v3.0
1.49k stars 189 forks source link

Extend modmap to ctrl modifier #721

Closed bokidori closed 1 month ago

bokidori commented 3 months ago

Hi Julow, and thank you very much for this amazing piece of software! In fact, I've registered on github today just to write thank you, and try to provide some contributions.

I've been using it for the last 2 years, seeing how each update makes it ever better - from documentation, multiple custom layouts (yey!), modmap, circular gestures, easy to read compass-point corner keys, and now even the clipboard pane... well done!

I've seen every issue slowly getting handled one by one, or added to the TODO list. One of them is fixing of Russian keyboard not able to use ctrl modifier: #438, #109. But it is not just the Russian layout, it is all non-Latin layouts. Hebrew, Arabic, Cyrillic, Tamil, etc. Different layouts also use different key combinations, so ie. paste is

en: ctrl v ru: ctrl м sr: ctrl в

Fixing for one non-Latin layout (ie. Russian like #438 proposes) could cause confusion in other layouts (ie. Serbian). Similarly, switching from random keyboard (ie. 4 rows, or 3 rows with 11 keys) to QWERTY US (as #109 proposes) would result in jumping buttons and easy to miss the intended one. I would instead propose modmap be extended to ctrl key, allowing individual layout editors to adjust ctrl shortcuts for their own language.

(Btw, before realising Fn-on-roundtrip-gesture in recent version is an intended new feature, I believed it was a bug, as it would frequently get triggered by accident on corner keys near the edge of the screen...)

Julow commented 3 months ago

Thanks for the encouragements :)

This seems like a good idea! You are right that the ideas in #109 and #438 are not a good fit considering the different cyrillic languages. I have made a rough implementation of this in 29b4b66. Could you try it ? You can find a debug build at the bottom of this page: https://github.com/Julow/Unexpected-Keyboard/actions/runs/10101951572

(Btw, before realising Fn-on-roundtrip-gesture in recent version is an intended new feature, I believed it was a bug, as it would frequently get triggered by accident on corner keys near the edge of the screen...)

Does it continue happening with the "Circle gesture sensitivity" option down ? I plan to add documentation and animated images explaining that in the future.

bokidori commented 3 months ago

I have made a rough implementation of this in 29b4b66. Could you try it ? You can find a debug build at the bottom of this page:

Wow! It works way better than I expected!

I've been testing it throughout the afternoon, and noticed general QoL improvements from this change, not just the basic cut/copy/paste. For example, upon updating notes and todo lists in Markor, just instinctively pressing Ctrl+S (С) at the end of the sentence and it saved. Same as it would have with a Latin keyboard, no need to bring my fingers to the top of the screen. In a Chromium-based browser, Ctrl+F (Ф) accesses browser search more ergonomicaly than Fn+swipe-over-3, etc.

From my perspective this solves the fundamental issues we've had with getting the ctrl modifier working on Cyrillic layouts. Huge thank you.

One "would be good" nitpick for some potential future improvement: it would be amazing if users still saw their native keys during this process. This is probably more relevant to Russian, Hebrew, Persian, etc. than Serbian as we are used to 2 scripts in everyday use. In any case, this is amazing, and beyond my expectations when opening the thread yesterday. I will update the Cyrillic layout tomorrow and do a PR.

[...] Fn-on-roundtrip-gesture in recent version is an intended new feature, I believed it was a bug [...]

Does it continue happening with the "Circle gesture sensitivity" option down ? I plan to add documentation and animated images explaining that in the future.

I consider it a non-issue – for me now, for future users once it is explained. Now that I know what is hapening (Fn activated) and why (roundtrip gesture), I understand better how to adjust my behavior with it. Regardless of gesture sensitivity, I do have a bit harder time controlling the roundtrip gesture only with corner keys at the edge of the screen, but could be just user error on my part. With time I should get a hang of it.

I don't know what to say. Huge, huge thank you!

Julow commented 3 months ago

it would be amazing if users still saw their native keys during this process.

Yes, I plan to do that when I'll get enough time to work on it.

Regardless of gesture sensitivity, I do have a bit harder time controlling the roundtrip gesture only with corner keys at the edge of the screen, but could be just user error on my part.

Thanks for the feedback, that's very useful as the feature is relatively recent and not well known. Usability of keys at the edge of the screen is a long time issue and I would like to ear ideas on how to fix it.

Julow commented 3 months ago

I'm leaving this issue open as a reminder that the labels are not right.

Julow commented 1 month ago

I've implemented the labels in 700ec23.