I have a fairly sophisticated Single Page Application, with a nice little menu system (similar to Windows 8 start menu). I\'d like for my users to hit the Windows key to open t
Write a custom binding handler for your button action -
ko.bindingHandlers.windowsKey = {
init: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var value = ko.utils.unwrapObservable(valueAccessor());
$(element).keydown(function (e) {
if (e.which === 91 || e.which == 93) {
value(viewModel);
}
});
}
};
As per the question of whether you can disable a button in Windows from the browser, see the answer that Daniel White posted that no, this cannot be done.