mbrlabs / Lorien

Infinite canvas drawing/whiteboarding app for Windows, Linux and macOS. Made with Godot.
MIT License
5.54k stars 240 forks source link

Canvas keybinding controls #177

Closed MrApplejuice closed 2 years ago

MrApplejuice commented 2 years ago

This is the one that I really was interested in (especially the zoom).

Maybe also addresses: #147 (?)

https://user-images.githubusercontent.com/542105/177951522-daef7bbb-9e5e-41f6-8d3e-03eb4dd07db8.mp4

mbrlabs commented 2 years ago

Btw, while your'e at at...the list of keybindings becomes pretty big. Can we maybe sort them alphabetically by name? This way all the "Pan" actions would be grouped together for example and stuff is easier to find in general.

Edit: Ah i just see you use an unordered map/dictionary for this. The order is different everytime Lorien is started. Probably a good idea to convert to an array sort it and then build the UI list from that.

Edit: Nevermind it's already an Array built from the InputMap. So it would only need to be sorted.

MrApplejuice commented 2 years ago

Looks good! Not sure why Godot thinks my Plus key (for zooming in) on my German keyboard is an Equal though. But i can remap it, so no big deal.

That is weird... I am using a German keyboard, too, and tested both: Numpad Plus and "normal" Plus keys and both are recognized correctly. I assume that there is a OS difference (I am on Linux, you on Mac?). I was worried about that. Godot is attempting to distinguish between "physical keys" and "regaular keys". I think the first ones are meant to be keyboard agnostic. However, I am not sure which ones I am actually recognizing with the scancode and OS-functions I am using... they seem to be the "regular keys" but there might be still some sort of bug. I assume that the Godot editor is correctly recognizing the "Plus"-key?

mbrlabs commented 2 years ago

I'm on Windows..but yeah might be an OS difference. I can test it on Linux tomorrow (it's a laptop with a differnt keyboard though).

I assume that the Godot editor is correctly recognizing the "Plus"-key?

Do you mean in the code editor for example? Yes, it works there. But in the InputMap dialog i get an Equal for the normal key and BraceRight (Physical) for the physical key. Really weird.