views:

135

answers:

1

Hey there 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?

+2  A: 

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 '/'.

Software Monkey
Indeed, not all keyboards are alike: http://hewgill.com/photo/trips/islands-world-2009/iceland/IMG_7008.JPG.html
Greg Hewgill
It's indeed not ideal, but seems to be the best option for me right now. Thanks!
Peter