Peter
Peter

Reputation: 627

Keystroke for cmd-? on OS X? (Java)

I'm desperately searching for the keystroke to access a help menu from my Java application. The command for that is cmd-?, but I've got no idea how to access that.

The keystroke for cmd-c is defined by KeyEvent.VK_C, but unfortunately VK_? does not work. ;)

I've searched the web up and down and couldn't find the right code. Has anybody here the right keystroke?

Upvotes: 3

Views: 479

Answers (1)

L. Cornelius Dol
L. Cornelius Dol

Reputation: 64066

That's because it's KeyEvent.VK_SLASH with a modifier for shift.

Personally, I think it's a blunder (on Java's part) to map things like that, since it assumes that my keyboard has '?' as a shifted '/'.

Upvotes: 3

Related Questions