Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable Ctrl+n to open new browser #290

Open
Yanbo opened this issue Aug 18, 2013 · 5 comments
Open

disable Ctrl+n to open new browser #290

Yanbo opened this issue Aug 18, 2013 · 5 comments

Comments

@Yanbo
Copy link

Yanbo commented Aug 18, 2013

is there a way in gateway to disable Ctrl+N to open new browser in chrome?

I searched google but don't get the answer, thanks.

@liftoff
Copy link
Owner

liftoff commented Aug 22, 2013

This is an issue in Chrome itself. There's a number of Ctrl key combinations that they do not allow JavaScript to override:

  • Ctrl-N
  • Ctrl-Shift-N
  • Ctrl-T
  • Ctrl-Shift-T
  • Ctrl-W

Personally I hate this and think it was a very, very bad decision on the part of the Chrome developers. It has been debated over and over again and they basically overruled common sense. Their "solution" is to launch the website in question in "application mode":

Menu -> Tools -> Create Application Shortcuts

If you do that while viewing your Gate One server it will create a shortcut on your desktop (just what we need--more shortcuts on the desktop) which you can then use to launch Gate One in a special Chrome window that allows you to use Ctrl-N.

I tried to get this fixed a LOOOONG time ago when it was an open bug:

https://code.google.com/p/chromium/issues/detail?id=84332

When they added the application shortcut thing they closed that issue... Even though it didn't really solve anything and creates new problems.

IMPORTANT:

There has been a proposal to remedy this situation that has been open for a long time now with absolutely zero progress:

https://code.google.com/p/chromium/issues/detail?id=33056

If you're like me and you think this is a seriously bad judgement on behalf of the Chrome developers please star that open bug and make a comment on that page asking the devs, "WTF? Seriously?" 😄

@weeger
Copy link

weeger commented Oct 11, 2014

WTF? Seriously?

@liftoff
Copy link
Owner

liftoff commented Oct 11, 2014

Gate One does disable ctrl-n and ctrl-t but the Chrome developers--in their infinite wisdom--decided that no web app should be allowed to override those shortcuts. I opened a bug about it years ago and it was closed with "wontfix".

There's a workaround but it isn't very convenient and it only works on Linux and Windows (not Macs): Add your Gate One server as an " application shortcut" on your desktop via the utilities menu. When you open a web app via that shortcut mechanism it actually enables the full W3C spec to allow overriding all shortcuts.

I highly recommend opening another bug on the matter. It really is stupid, annoying, and a bug.

@stlawTechie
Copy link

can we do in any other way to prevent hot keys and shortcut key in chrome.

@suryyanshomar44
Copy link

@stlawTechie , Have you found the solution to prevent ctrl+N.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants