Skip to content
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

Feature Request: Editor Font Size using Command + and Command - #845

Open
CubeOfCheese opened this issue Jul 18, 2024 · 1 comment
Open

Comments

@CubeOfCheese
Copy link

Description

Almost all editors/IDEs allow you to dynamically change your font size using Command + and Command - keyboard commands.
As a teacher this is essential for me. I would like to use Processing in my computer science class, but if I can't dynamically resize my editor font, then I won't be able to effectively display code for the students in the back of my class.
Going to preferences and adjusting it manually is not a sufficient solution because I need to be able to quickly switch between showing the general structure of the code and specific sections quickly.
I hope I have clearly communicated why this feature is important.

Your Environment

  • Processing version: 4.3
  • Operating System and OS version: MacOS 14.5
@Tsufael
Copy link

Tsufael commented Jul 20, 2024

Hi, I started working on a PR for this issue.

I thought about adding 2 font size control options to the Edit menu with the ctrl = and ctrl - shortcuts (meta = and meta - for mac) just after the indent options as in the picture:

fontSize

I'm not sure what's the proper way to make the text editor ignore the '=' and '-' keys when Ctrl/Meta is pressed though. Currently I'm adding an entry for those keys to public boolean handleTyped(KeyEvent event) in java/src/processing/mode/java/JavaInputHandler.java (that's the function that consumes VK_COMMA and VK_SPACE when used with ctrl).

However doing it that way doesn't feel right since no other menu shortcut has to do that. Could someone please point me to the right direction?

Also, would it be helpful to have the same feature for the console font size (maybe with Meta+Shift+= and Meta+Shift+-)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants