What keyboard shortcut can i use without conflicts with modern browsers? - web

I'm developping a web application and i intend to use mouse and some keyboard shortcuts, and if possible, use modal keys (Ctrl / Shift / Alt).
I've noticed a lot a conflicts with modern browsers/OS. Here are some examples you may know:
Ctrl+S
Ctrl+F
Shift+R : refreshes the page on firefox
Alt+left click : moves a window on linux
Ctrl+J : opens the download tab in chrome
I can't find what shortcuts (with modal keys) i can use safely in my application. Is there a list somewhere of a rule to follow?

You could have a look at this, which is a rather exhaustive list of used shortcuts.
However your question has already been asked here and here and it seems there is no such list.

Try this:
http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
My suggestion would to throw something unique in the shortcut for example:
Say you needed to bookmark something quickly, chromes is ctrl+D, instead i would do ctrl+shift+m or ctrl+alt+m
Even still you might run into duplicate shortcuts, but going with something unique will give you the best results.
Hope this helps.

Related

Accessible hotkeys for superscript and subscript

I want to add a feature of making text super- or subscript to a WYSIWYG text editor in my web application and I need to set up hotkeys for it. Popular editors like Microsoft Word use Ctrl+Shift+= for superscript and Ctrl+= for subscript, but I can't use those since they trigger browser native zoom. Of course, I have separated buttons for super- and subscript and I will add hints to them, but I'd still like to make hotkeys as convenient as possible. Is there another common combination for these features?
Alternative Hotkeys
Ctrl + . for superscript and Ctrl + , for subscript are acceptable alternatives. (full stop / period and comma). They are the defaults set for Google Docs so familiarity will be reasonably high.
Accessibility Considerations
You cannot assume that any key is 'safe' as people may change their hotkeys to their preference.
For this reason you should always give people the option to change shortcut keys themselves in a settings menu (which should be easy to access).
You should also give people the option to toggle hotkeys on and off (yet again making the hotkey for that toggle customisable to their preference).
A lot of the time people come unstuck because they use a hotkey that overlaps with a screen reader hotkey and the hotkey doesn't work so make sure you consider the above before implementing hotkeys.
Also make it clear what hotkey is set for each item (to both sighted and screen reader users).

Switch between panes in VIM for codepen.io?

When using vim mode in codepen.io, how do you switch between panes as ctrl+w+w doesn't work as it closes the window tab. What other codepen.io specific key bindings are there?
It'd probably be better to ask the project maintainers, but it does not seem like it's possible. There's a whole page on their blog post that hints as to why. It also has a link to the project providing that functionality.

Visual Studio hot key - switch Find context/location

Is there a hot key to toggle the search context/location in the "Find"/"Find in Files" commands (Ctr+F and Shift+Ctrl+F respectively )? I'm talking about the drop down that asks where to search for example Current Project, Current Document, Entire Solution etc.
"Find" is probably my most used feature since working with markup and CSS very often I can't just F12 to a selector definition or Shift+F12 to Find Usages, a regular text search is really the only option and I want to make this as efficient as possible.
Yes, I can tab to it but this takes 6-tabs and if I do it fast, often get the count wrong and prematurely execute bad searches; so it's not cutting it.
If there isn't a hotkey how can I set one? Ctrl + F3 would work well since F3 is "Find Next"
Thanks
I'm not sure if there is a command in Visual Studio that does what you are looking for.
If there is one, you can set the shortcut key in the Tools\Options menu (Environment\Keyboard).
In the screenshot, I'm searching for all the VS command that contain "find". Perhaps one of these is what you need.
Then move to the Press shortcut keys textbox and choose your desired key binding.

Shortcut with meta-shift key doesn't work in emacs

I can't use any shortcut that has meta-shift (alt and shift) in it because ubuntu will treat it as "change keyboard layout" shortcut (I map it to alt-shift since I use the same shortcut in windows) as soon as I press m-s. In windows change keyboard layout shortcut doesn't register until you release the key so any shortcut with m-s is usable in windows.
Is there any work-around without changing shortcut or meta key ? I kinda used to it.
Change the Ubuntu change-keyboard-layout shortcut, to something else.
Or use Esc as Meta
Nothing easy that I know of.
You can manually bind everything that's M-S-??? to C-M-S-??? in your .emacs or at least all of the ones that you use...
Or you can just change the short-cut... how often do you change the keyboard layout? (I use dvorak, and qwerty, but I've never needed a shortcut for it, I just use the button...)
I have tried different things, and in my opinion it is best to change the layout shortcut to something else. The power of emacs is all in its shortcuts that are available right there under your fingers. If you move the M key away and make it harder to reach, it will most surely have a negative impact on your editing speed.
Right now I'm trying to get used to switching layouts with the right Alt key. I almost never use it for anything, so missing it won't be a problem. And from my experience teaching yourself to switch layouts with another combination is a matter of several days.
P.S. Also it pays to use Caps-Lock as an additional Ctrl key, it helps tremendously!

What are the best keyboard macros for programming in windows?

I like putting shortcuts of the form "g - google.lnk" in my start menu so google is two keystrokes away. Win, g.
My eight or so most frequent applications go there.
I also make links to my solution files I am always opening "x - Popular Project.lnk"
Are there any better ways to automate opening frequently used applications?
AutoHotkey is a reasonably good program for implementing windows key shortcuts. You might instead define WIN + G to be "open browser to google" which gives you a better response time (don't have to wait for start menu to popup, etc)
There are macro programs that change the macros used based on the window that's in focus. I've never needed that much control, but you might want to look into that.
-Adam
Get a keyboard launcher program like Launchy
For shortcuts I use Launchy
For macros I use AutoHotKey
Others will suggest SlickRun for shortcuts also.
I use a lot the "intellisense" snippets in Visual Studio. You can include your own snippets and press double tab when they appear in the list. That's definitely a time saver.
I use QuickMacros and love it.
so much so, that I did some extensive training articles on it here.
The holy grail-
Ctrl-C, Ctrl-V
I kid, I kid! Try the veal!

Resources