Get started: Text size using scroll wheel


#1

I am trying to create a package that will listen for mouse wheel event (and check if Ctrl is pressed), and if so, will increase/decrease editor text size accordingly.

I am v. familiar with HTML/JS (a little coffee script), but really don’t know where to start (obviously I have created the package shell) - but as far as finding mouse wheel events, setting text size etc.

Hopefully someone can help point me in the right direction! Thanks :smile:


#2

I have tested the following, which seems to work well:

atom.workspaceView.increaseFontSize()
atom.workspaceView.decreaseFontSize()

Now just need to plug into mousewheel event :smile:


#3

So I have worked it out.

I have published my package here:
https://atom.io/packages/wheel-zoom

Pretty self explanatory, use the mousewheel event, check for ctrl key and increase/decrease font size. :smile:

Hopefully it helps others