When I test my Silverlight 2 app in Firefox, when Silverlight has focus, I have no problem receiving every key press via the Page.KeyDown event.
When I test it in Internet Explorer 7, I can only get keyboard events that the browser doesn't already handle. HOWEVER, I can override those same keyboard events in javascript.
For instance, Ctrl + D. I can override this in javascript by doing the following, but I can't do the same thing in Silverlight!!
function initKeyHandling(){ document.attachEvent("onkeydown", keydown); }
function keydown(e) { printToTextbox('Keydown ', e); return false; }
...
initKeyHandling();
Furthermore, my attempts to forward the events from Javascript to Silverlight have failed. My javascript keyboard event handlers never even get fired when Silverlight has focus.
From the docs it seems that it is not possible (at least without a javascript work around like you are mentioning):
Have a look at: http://msdn.microsoft.com/en-us/library/cc189015.aspx
I think I read about a work around with an underlying HTML textbox the other day. But I'm not sure if it still supported, or what the details were. I will return if I find it again.
/Asger
We've run into similar issues using Flash, and we had to resolve them by having a separate DIV tag on the same page which we'd have to programmatically set the focus to whenever we needed to invoke our keyboard shortcuts.