keyboard shortcuts « Intelligrape Groovy & Grails Blogs

Posts Tagged ‘ keyboard shortcuts ’

Compiled List of Some handy firefox shortcuts

Posted by Hitesh Bhatia on July 23rd, 2010

Auto complete .com Address Ctrl+Enter
Auto complete .net Address Shift+Enter
Auto complete .org Address Ctrl+Shift+Enter
Back Alt+Left
Bookmark All Tabs Ctrl+Shift+D
Bookmark This Page Ctrl+D
Bookmarks Ctrl+B
Copy Ctrl+C
Cut Ctrl+X
Clear Recent History Ctrl+Shift+Del
Downloads Ctrl+Shift +Y
Error Console Ctrl+Shift+J
Forward Alt+Right
Close Tab Ctrl+W
Close Window Ctrl+W
New Tab Ctrl+T
New Window Ctrl+N
Next Tab Ctrl+Tab
History Ctrl+H
Open File Ctrl+O
Page Info Ctrl+I
Paste Ctrl+V
Page Source Ctrl+U
Previous Tab Ctrl+Shift+Tab
Print Ctrl+P
Redo Ctrl+Y
Reload F5 or Ctrl+R
Reload (override cache) Ctrl+Shift+R or Ctrl+F5
Save Page As Ctrl+S
Select All Ctrl+A
Select Location Bar Alt+D
Select Tab (1 to 8 ) Alt + ( 1 to 8 )
Select Last Tab Alt+9
Toggle Full Screen F11
Toggle Private Browsing Ctrl+Shift+P
Undo Ctrl+Z
Undo Close Tab Ctrl+Shift+T
Zoom In Ctrl + +
Zoom Out Ctrl + -
Zoom Reset Ctrl+0

_______________________________
Hitesh Bhatia
hitesh@intelligrape.com

http://in.linkedin.com/in/bhatiahitesh

_______________________________

  • Share/Bookmark
Posted in Uncategorized

Add hotkeys to the web application

Posted by Amit Jain on September 28th, 2009

Let us have a look at the simple javascript code, that can be used to add hotkeys to our web application. I tried using jquery hotkeys plugin and two more plugins, but they didn’t work for me.

So I ended up handling the keydown event of my own.

var isAlt = false;
document.onkeyup = function(e) {
    if (e.which == 18) //18 is the keycode for 'Alt'
	isAlt = false;
}
document.onkeydown = function(e) {
    if (e.which == 18)
	 isAlt = true;
    else if (e.which == 69 && isAlt == true) { //69 is the keycode for 'e'
        function1(); 	 // executed when alt+e is pressed
        return false;
    } else if (e.which == 71 && isAlt == true) {
        function2(); 	 // executed when alt+g is pressed
        return false;
    }
    ...
}

Hope this helped.

Cheers!
~~Amit Jain~~
amit@intelligrape.com
IntelliGrape Softwares

  • Share/Bookmark