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

Feat: add bullet shortcut for Mac users #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

conmcdon721
Copy link

I'm using nullboard on a Mac and couldn't figure out how to add bullet
points. On line 4709 of nullboard.html, I found the shortcut for adding
bullet points on Windows. I added an OR to the conditional so it
includes the Mac's Command key.

In my OR conditional, I included both the Shift key and the 8 key. For
some reason, the asterisk key wasn't working for me. Moreover, I used
the Meta key instead of the Command key's key-code. I did this to
minimize the necessary code: the left and the right Command keys have
different key-codes, and the Command keys' key-codes are different for
each browser.

The drawback to this addition is that Windows users may unintentionally
create the event by pressing the Windows key, which is also a Meta key.

I'm using nullboard on a Mac and couldn't figure out how to add bullet
points. On line 4709 of nullboard.html, I found the shortcut for adding
bullet points on Windows. I added an OR to the conditional so it
includes the Mac's Command key.

In my OR conditional, I included both the Shift key and the 8 key. For
some reason, the asterisk key wasn't working for me. Moreover, I used
the Meta key instead of the Command key's key-code. I did this to
minimize the necessary code: the left and the right Command keys have
different key-codes, and the Command keys' key-codes are different for
each browser.

The drawback to this addition is that Windows users may unintentionally
create the event by pressing the Windows key, which is also a Meta key.
@apankrat
Copy link
Owner

Hi Connor,

Can you run a quick test for me? Add console.log(ev) at line 4709 (after // ctrl-shift-8), then hit Command-Shift-8, Command-8 and Command-* with * on the numpad. Then let me see the output from the dev console. Hardcoding * as Shift-8 seems somewhat hacky, so I'd like to see if there's a cleaner way.

The drawback to this addition is that Windows users may unintentionally create the event by pressing the Windows key, which is also a Meta key.

This is not an issue. Chances of anyone ever using Windows-* combo with the asterisk via Shift-8 are next to zero.

@dustinsterk
Copy link

I had this same issue, the or statement worked perfect for the MacOS.

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

Successfully merging this pull request may close these issues.

3 participants