JavaScript · JQuery

Keyboard Shortcuts using JQuery

Again it is very simple, looks you to feel like a magician if you are done. Just follow the steps :- Download the shortcut.js file and include it in your layout or view file <%= javascript_include_tag ‘shortcut’ %> Then, add the following lines in the layout or view file where you want the keyboard… Continue reading Keyboard Shortcuts using JQuery

HTML · JavaScript · JQuery · ruby · Ruby On Rails

Handling Keyboard Shortcuts in Rails or HTML

Handling keyboard shortcuts in a Rails app, HTML using javascript is pretty simple. Just download a shortcut.js from the following URL : Rails :- Paste the file in the /public/javascripts folder Write the following code in your view / layout file before <body> tag. <head> <script src=”/javascripts/shortcut.js” type=”text/javascript”></script> <script type=”text/javascript”> shortcut.add(“Ctrl+Shift+X”,function() {alert(“You Pressed Ctrl+Shift+X!”);});… Continue reading Handling Keyboard Shortcuts in Rails or HTML