jwa
jwa

Reputation: 3281

Chrome Application Mode - Disabling Shortcuts

When attempting to use Chrome in application mode as a host for an HTML5 application, there seem to be some severe limitations.

For example, if the user hits CTRL+T it will open up a new Chrome browser window, and allow them to start typing in the address bar. Ditto for CTRL+W. This is disconcerting, as it directly contradicts the intention of application mode; to make a web page feel like a normal application (that's not in Chrome).

Is there some mechanism through which one may disable this functionality?

Alternatively, are there forks of the Chrome project which are better suited to wrapping-up HTML5 applications?

Upvotes: 0

Views: 914

Answers (1)

Lesley.Oakey
Lesley.Oakey

Reputation: 353

Chrome Kiosk mode seems a little more appropriate but still suffers the issue of allowing new tabs (although possibly handles them a little better than app mode). Enable kiosk mode in a shortcut with shortcut format

"...\chrome.exe" --kiosk

Otherwise it may just be a case of manually disabling certain Ctrl + key events.

Eg disabling the save event Ctrl+S (in jQuery without hotkeys - I'm sure there are other methods for whatever your preferred JS lib is)

$(document).bind('keydown', function(e) {
  if(e.ctrlKey && (e.which == 83)) {
    e.preventDefault();
    return false;
  }
});

Upvotes: 1

Related Questions