editor2-issues
editor2-issues copied to clipboard
Increase font size does not work with keyboard shortcut
Expected behaviour
The font size gets increased.
Actual behaviour
Keyboard shortcut does not work as it should.
Steps to reproduce
I tried to increase the font size with the keys ⌘ and + but that did not work. ⌘ and - did work and decreased the font size. To increase the font size I now need to use the menu > view > increase font size item.
| Build time | 2018-08-28T09:07:35.632147 |
| Defold channel | editor-alpha |
| Defold editor sha | 8bba2570d5e2984cd49b6bad0da863db6efb0545 |
| Defold engine sha | 1b90c9a905d634b766b467e3536458b9210ec812 |
| Defold version | 1.2.135 |
| GPU | Intel(R) Iris(TM) Graphics 6100 |
| GPU Driver | 2.1 INTEL-10.36.19 |
| Java version | 1.8.0_102-b14 |
| OS arch | x86_64 |
| OS name | Mac OS X |
| OS version | 10.13.6 |
Hi @amel! Works on my machine :) What keyboard layout are you using?
Hi @erikangelin-king! Strange. I'm using the US international keyboard layout.
Thanks! Alright, we're mostly testing with a swedish keyboard layout but we know we need to look into others at some point. Strange though that US doesn't work.
#1236
Let me start by saying that these comments only apply to the Mac version. The way JavaFX works on Windows is substantially different so it's not likely that whatever I say here will apply to #2190.
Work-around: whenever Defold has the focus press Shift+'=' to generate a + character. The shortcut will start working. You can even do this at the splash screen.
The central problem is that JavaFX on the Mac can't figure out where a shifted character is until the user types it. Holding down Cmd and pressing the key with + on it is not enough, since you're not holding down Shift internally the system sees an = character go by so it still has no idea where + is.
A source code fix would be to add ["Meta+'='" :zoom-in] as a binding in addition to ["Meta+'+'" :zoom-in]. Keyboard layouts on the Mac generally come in two flavors, those where = and + are on the same key and those where = is Shift+0 and + is somewhere else. For the latter keyboards (such as German) the double binding means Meta+0 would invoke zoom-in in addition to Meta+'+'. (Though keep in mind that the same JavaFX limitation applies, on a keyboard where = requires a Shift the system won't be able to figure out where it is until the user types it).