New Keyboard Menu - #3536
Conversation
Since pressing a key selects that key, including the arrow keys, it doesn't really make sense to select the first key here.
|
Oh wow, this is pretty, and pretty cool! |
|
Would I be able to try to make a proof-of-concept of that more compact UI? Should just be some size/style changing. |
|
Yeah, go ahead |
|
@ego-lay-atman-bay Hows this: |
|
I got an invitation - do you want me to commit it there (I already kind of made a whole branch on something else for a PR...) |
|
Yeah, I was thinking it might be best to contribute to the same PR |
|
Commited! Hoping I didn't do anything wrong.. |
|
Just took a look at this. I like the new compact design, but ideally the borders between keys would be half-width, or the keys would be closer together, so that the borders are equal in thickness whether on the edges or between keys. |
Think I shouldve fixed this, i made each key subtract one from x after placing. Have yet to test this though, would you be able to pull down the new code and test it? |
|
Should be fully fixed now, i just needed to update the spacing code to also respect the borders |
|
One issue I see is when translated to other languages. Some words may go outside the key bounds. The space key should be fine because it's so wide, but any, backspace, tab, and enter won't. Backspace and enter should be fine to just increase the width to compensate, and any can just be moved to the bottom row to also be able to increase, but tab may be an issue. I'm thinking we can just remove tab because I think it's a more niche key to want, and it's also still possible to select it just by pressing tab. |
|
I can conceive of some kind of autoscaling to maintain the rest of the dimensions, but removing tab wouldn't be the worst thing in the world by any stretch. I really like being able to just type any key and make it go straight in though. |






I never really liked how in scratch and snap, the menu for selecting keys was just a huge dropdown list, so I decided to redesign it to be a full keyboard layout.
Screencast_20260520_133258.mp4
When you open it, you can select all the keys you could before, but with a better ui. When you hold shift, there are also many keys that change to their shifted counterparts, so for example, 4 would become $ when holding shift. I also added a really nice quality of life feature that just detects whatever key you press and automatically selects that one, so you don't even have to use the ui (it also allows for selecting keys not in the menu), but pressing esc will close the menu instead of selecting it. I also made sure that everything is localized, or at least uses the localized method. The only issue right now is that there's no way to toggle shift with the ui.
Just to be clear, when holding shift, it doesn't make all the letters uppercase because snap doesn't detect the key when it's uppercase (possibly a bug).
Since this new menu is very large, I decided to make it fall back to the old menu on smaller screens (if the menu width is larger than the world width).