I’m in the middle of developing an entirely javascript-based sudoku game. I developed it mostly while working with firefox on windows, and figured that once I got it working without bugs in firefox, I’d make it work in Safari, Opera, IE, etc.
So far, everything’s gone great (I haven’t started making it work in IE yet), except for one little thing. The game makes extensive use of keyboard shortcuts. Particularly, pressing CTRL + NumKey toggles a penciled-in mark in the currently selected space and CTRL + ArrowKey moves to the next un-filled space in the direction indicated. These both work just fine in every browser, with two exceptions: Opera doesn’t handle the CTRL + ArrowKey correctly (it does what I want it to do but still does the application-specific behavior even though I’ve preventedDefault), and Safari doesn’t handle CMD + NumKey right (the keypress handler just never fires at all for these key combinations!). The funny thing is, in the Safari case, CTRL + NumKey does just what I want it to, and CMD + – (another key command) works just fine–it’s just that [I]cmd
My question is, is there a way to use those key-commands in these programs? I’ve looked on the internet but really can’t find anything, and I’ve gotten to the point where I’ve run out of ideas. I’m doing everything available to cancel the event in Opera, but those pesky CTRL + ArrowKeys just keep on bubbling up and being acted upon by the application no matter what.
I know probably the best way to avoid these problems is just to not use these particularly keyboard shortcuts, but if there’s a way to keep using them in Safari and Opera, I really want to. I also know that it’s bad style to make keyboard shortcuts that people have come to rely on do something different when your page is loaded.
For reference, the page in question is [URL=http://people.fas.harvard.edu/~jkomoros/sudoku/index.html]here
Thanks for your help!