-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Keyboard shortcut for Increase Font Size not working and incorrect shortcut shown in the Edit menu #6806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Fair enough, although I think one is a consequence of the other. It appears that KeyStroke.getKeyStroke does not like '+' as an argument. To clarify, it is not only displayed incorrectly, but the shortcut Ctrl+ Plus does not work. |
Sorry, I misunderstood the issue report because you only talked about the menu issue in the description and I tested that the new keyboard shortcut Ctrl+MouseWheel was working correctly. I forgot it is also Ctrl+Plus, though I should have noticed that Ctrl+Minus is Decrease Font Size. I've updated the title. Thanks for the issue report! |
Thank you. That describes the issue perfectly. |
I took a look at this issue and it seems quite complicated to solve. |
The + and - on the numpad are already assigned to opening and folding code blocks, which I would say is far more useful because it's a function that would likely be used repeatedly. I imagine that most people would set their preferred font size once and then leave it, and there is still Ctrl+ mousewheel for those of us that use zoom more often. Of course, not all users have mousewheel functionality either, especially those using a trackpad on a laptop. |
This problem still exists... |
@ElectricRCAircraftGuy would you mind testing the beta? It contains 3d5c1bd which should solve the issue for different keyboard layouts. |
Yeah...but I've never used the Beta. Do I need to build it or are binaries available? |
Nevermind, getting it now off the "beta builds" section here: https://www.arduino.cc/en/Main/Software |
I tested 1.9.0-beta and the menu looks better (no longer has that weird error), but Ctrl + PLus still does not work. Ctrl + Minus is fine |
The Ctrl+Plus keyboard shortcut (by "Plus" I mean the =/+ key) does not work for me with Arduino IDE 1.9.0-beta build 36 on Windows 10. |
The same for arduino-PR-beta1.9-BUILD-36 in 64-bit Ubuntu. Ctrl+Plus displayed correctly in menu but does not work. Ctrl+Minus works. |
With my setup, Win 10 & 1.8.5, ctrl+wheel either way just reduces the font size. How about disabling the wheel for font size changes? I accidentally reduce the font with the wheel then have to go to preferences to fix it. If ctrl+wheel didn't change the font size, this issue would be moot for me. |
Ditto here, Windows 10 Dell, Arduino 1.8.5, Teensyduino 1.41 |
Mouse wheel while holding CTRL is able to scroll in and out when I try with Arduino 1.8.5 on Windows 10 and Ubuntu 14.04. Here's a quick screen recording from Windows 10. |
Thanks, Paul! I knew that wheel thing was useful for something.... |
I had tried and found ctrl+wheel only decreased font size. Just tried it again and it does both. What changed? Same with 1.9.0 |
I spent a couple hours looked into this bug (the keyboard shortcut, not scroll wheel). The fix in 1.9 to use KeyEvent.VK_PLUS does not work on US keyboards, and presumably all others where '+' is typed with the shift key (which are the vast majority of the world's keyboards). Sadly, it seems all roads not from actual keyboard input lead to "KEY_TYPED" codes & events, which don't have any awareness of the keyboard layout. Java's KeyEvent.getExtendedKeyCodeForChar() looked like the most promising option, but it turned out to be an empty promise. It returns VK_PLUS, even when a US keyboard is used. Digging deeper into this, I found many references to the keyboard layout being handled by the host system. After a couple hours, the reality started to sink in that Java doesn't seem to actually have any logic/knowledge of the keyboard layout at all. :-( As nearly as I can tell, the only solution is to query the Locale or I18N translation info. But even that appears to be less ideal. It also seems to lack any solid info about the actual keyboard layout used. Whether to use VK_PLUS or VK_EQUALS can be clear in many common cases, but there doesn't seem to be any Java way to perfectly find this info. There are also some unusual cases like VK_4 on Turkish, or VK_1 on Swiss keyboards (where the language info alone would suggest French or German or Italian, not the distinctly different keyboards layouts used in Switzerland than keyboards in France, Germany & Italy). |
May I suggest that you simply get rid of the the keyboard shortcuts for changing font size? You provide the wheel based font zoom and you can set both the font size and GUI scale factor in the preferences menu. |
With 1.9.0 beta build 71, sometimes ctrl+scroll-up increases font size and sometimes it does not. I think I try it just after starting the program. Also, ctrl+minus works and ctrl+plus does not at the moment. |
It seems that most keyboards have either "+" directly available on the base layer or as SHIFT+"=", so the simplest solution is to use two keybinding for the "Increase Font Size" action: See #7888 |
Edit menu shows Increase Font Size shortcut as 'Ctrl+ Unknown KeyCode: 0x2b'. The same behavior is seen on W10 and W7, with Logitech USB (HID keyboard device) and Microsoft PS/2 (standard PS/2 keyboard) keyboards.
The text was updated successfully, but these errors were encountered: