Eraph Posted July 27, 2015 Share Posted July 27, 2015 G'day folks, There is probably a really easy solution to this but I can't find it in examples/documentation/forums. I'm using the Ctrl key to fire a weapon in my game, and WASD to move. Problem being of course that if you hold Ctrl and press a key, it triggers a browser action. Is there any way to prevent this? Cheers! spinnerbox 1 Link to comment Share on other sites More sharing options...
Langerz82 Posted July 27, 2015 Share Posted July 27, 2015 I found this it may help:http://stackoverflow.com/questions/24764626/any-way-to-prevent-disable-ctrl-key-shortcuts-in-the-browser Basically my understanding is Ctrl+W is reserved for chrome so its a bad combination. Just wondering, how come you are using ctrl and not something else for firing, using the left-ctrl with the little finger tires out after awhile and from a usability perspective may not be the best choice. Eraph 1 Link to comment Share on other sites More sharing options...
Skeptron Posted July 27, 2015 Share Posted July 27, 2015 And please avoid WASD, use arrows instead. Not everyone has a Qwerty keyboard! Eraph 1 Link to comment Share on other sites More sharing options...
drhayes Posted July 27, 2015 Share Posted July 27, 2015 You'd probably be interested in addKeyCapture when you switch to the arrow keys. ( ; Eraph 1 Link to comment Share on other sites More sharing options...
Eraph Posted July 27, 2015 Author Share Posted July 27, 2015 All good advice! I'll give addKeyCapture a go and think about how I can make better use of controls. Cheers guys! Link to comment Share on other sites More sharing options...
Recommended Posts