TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Keyboard Shortcuts in C# Application using Jquery
Abhishek Chadha
Sep 03
2015
Code
1.2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
$(function() {
$(document).keyup(function(e) {
// Function Call on keyup Event
var key = (e.keyCode ? e.keyCode : e.charCode);
// find the keycode
switch
(key) {
case
64:
// on pressing @ Reset Button call
document.getElementById(
"<%=btnreset.ClientID%>"
).click();
break
;
case
32:
// on pressing space save button call
document.getElementById(
"<%=btnsave.ClientID%>"
).click();
break
;
}
}
});
Some More Keycodes:
For Digit 0 - 9 keycodes are from 48-57 respectively.
For Uppercase A - Uppercase Z keycodes are from 65-90 respectively.
For Lowercase a - Lowercase z keycodes are from 97-122 respectively.
jquery
shortcuts in c#