Commit Graph

17 Commits (c7ad4ad2d43b15f0b3ed60c70c16e0867fc5a4cb)

Author SHA1 Message Date
Michael Kuhn e74f7bde22 Refactor hotkeys to use keypress instead of keydown
keydown returns the "raw" key in event.which. Depending on the keyboard
layout, this may not be what is wanted. For example, on a German
keyboard, Shift+7 has to be pressed to get a slash. However, event.which
will be 55, which corresponds to "7". In the keypress event, however,
event.which will be 47, which corresponds to "/".

Sadly, several important keys (such as escape and the arrow keys) do not
trigger a keypress event. Therefore, they have to be handled using a
keydown event.

This change refactors the hotkey support to make use of keypress events
whenever possible. This will make hotkeys work regardless of the user's
keyboard layout. Escape and arrow keys are still handled via keydown
events.

There should be only one change in behavior: I could not make Ctrl+/
work and therefore rebound the help dialog to "?".
6 years ago
Andrew Dolgov 957c44d177 rework git update checking to be initiated by frontend, outside of runtime info output 6 years ago
Andrew Dolgov 54ce930b8d delay counters request on promise completion a bit 6 years ago
Andrew Dolgov d3885c5883 App.toggleNightMode: add some fadein/fadeout 6 years ago
Andrew Dolgov d53cdaf815 requestCounters: remove cooldown 6 years ago
Andrew Dolgov 7a98105960 remove old fatalError(), move everything to App.Error
update exception dialog css
6 years ago
Andrew Dolgov 071ca5aa96 Error.report: use JS template strings 6 years ago
Andrew Dolgov 7e5c999146 show alert if recent_log_events > 0 6 years ago
Andrew Dolgov 1c8593c1fa add hotkey (a N) to toggle night.css 6 years ago
Andrew Dolgov a1c595687e fix previous to not crash in prefs 6 years ago
Andrew Dolgov 5e007e0090 headlines-spacer: only set 100% height if auto catchup is enabled 6 years ago
Andrew Dolgov 0b8cbc9156 remove some bitmaps and rework stuff using it to use iconfont instead 6 years ago
Andrew Dolgov 0ea0b606be rework net-alert to use iconfont, move it to toolbar start 6 years ago
Andrew Dolgov 71fc6d45bd refactor error reporting to AppBase; keep exception_error() for now as a shim 6 years ago
wn_ b83ed6c7c4 Fix reference to `PluginHost`.
A `const` doesn't create a property on `window`.
6 years ago
Andrew Dolgov 5ead558e43 move Utils to AppBase where it belongs 6 years ago
Andrew Dolgov ac8361e6f6 add AppBase as a shared ancestor for main and prefs app objects
remove event.observe stuff from startup, unneeded
6 years ago