nick-shmyrev / improved-osk-gnome-ext

Improved On Screen Keyboard for Gnome Shell
https://extensions.gnome.org/extension/4413/improved-osk/
94 stars 30 forks source link

layout changes for gnome 42 #45

Open poulou0 opened 1 year ago

poulou0 commented 1 year ago

Continuing from https://github.com/nick-shmyrev/improved-osk-gnome-ext/issues/44

I did some amending in the PR branch

nick-shmyrev commented 1 year ago

First of all, thanks again for your contribution, some great ideas here! Unfortunately, there are some issues with these changes, most of them caused either by how the original Gnome OSK works, or by how different distros customize Gnome Shell UI, and I would understand if you'd rather not deal with all of this. If you'd like, I can take over from here, and implement these changes myself.

Layouts with different number of keys

I haven't checked all 60 layouts, but here are a few different ones off the top of my head: Arabic image

Spanish image

French image

Ukrainian image

Russian image

To be honest, I haven't really thought about it before, but I now understand that these differences in layout shapes were the reason why the arrow keys were all placed on the same row. And it's probably best to keep it that way.

SUPER key

The problem with keeping "Super" key only in the uppercase level is that while you see that layer, the "Shift" key is latched. So if you send a "Super + " combination, you'd be effectively sending a "Shift + Super + " combination, and won't be able to input something like "Super + E" at all. It's probably best to just keep "Super" in both upper and lowercase layers. It should fit in nicely between "?123" and "Alt" keys, for example. This way, the "Ctrl" and "?123" keys would still be where most people would expect to see them.

Insert key

Similar to Super key, it would probably be best to just keep it in both upper and lowercase layers. I'd be fine with sacrificing the "Delete" key for that, since there's already a "Backspace" button that does practically the same thing.

CSS styling

Looking back at the issues I ran into with customizing CSS styles (button shapes, background and font colors, font size, etc.), I'm now thinking touching those was a mistake. See issues #12, #14, #17, for example. Each deviation from the default styles is an additional chance for something to break in one of the many distros that run Gnome Shell. That's why I got rid of custom styles altogether when I refactored this extension for Gnome 43, and should probably get rid of all custom styles in older versions as well.

Changing ABC to ?123

Not sure if I'm fully on board with this. It would be rather confusing once you switch to the symbols (last) layer. There's a button with numbers on it, so it looks like it should take you to the numbers layer, but instead you end up on the lowercase layer. Someone will eventually think it's a bug and report it.

poulou0 commented 1 year ago

No problem, I have an idea that I first want to run with you before checking all the languages (I can use some help with that :) It might be that I can "save" the UP key to be on the 3rd line.

Layouts with different number of keys

Let's say that we only have the layouts above, to keep things simple for now.

We have 4 rows, trying to fit everything in a 14 "units" of width. ![columns](https://user-images.githubusercontent.com/48758557/233497295-7fa7238c-6099-40ae-a25a-a0763ae55540.png)
I want to keep the left side untouched to have this nice effect ![left side](https://user-images.githubusercontent.com/48758557/233496105-2444bf3f-ee4d-41f4-ada6-d89c0e69570d.png)

So I was thinking I could add extra buttons to the right when its needed. (I strive to keep the common keys in the same position in all the languages and levels but its not always possible)

PS. I will probably refactor the code to be more readable if we go that way.

SUPER key

I had to shuffle things around but I put it in every level. (I put it on the right because on the left it pushes the spacebar too much).

Insert key

Kept both insert and delete, for this draft commit. We can decide later ✌️ I'm not the best to decide because i use "delete" and "home" and "end", while most people use "pageUp/dwn" i guess 🤣

CSS styling

Cleaned a lot things up already, will do more on the final

Changing ABC to ?123

No argue on that 👍