Become a member
Sign in
Duncan Leung
Duncan Leung

Duncan Leung

1 Following
2 Followers
  • Profile
  • Claps
  • Highlights
  • Responses

Highlighted by Duncan Leung

See more

From Creating Keyboard Shortcuts in JavaScript by Melwin D'Almeida

document.onkeyup = function(e) {
if (e.which == 77) {
alert("M key was pressed");
} else if (e.ctrlKey && e.which == 66) {
alert("Ctrl + B shortcut combination was pressed");
} else if (e.ctrlKey && e.altKey && e.which == 89) {
alert("Ctrl + Alt + Y shortcut combination was pressed");
} else if (e.ctrlKey && e.altKey && e.shiftKey && e.which == 85) {
alert("Ctrl + Alt + Shift + U shortcut combination was pressed");
}
};

Claps from Duncan Leung

See more

Vanilla JS Whack-A-Mole

Peter Chicarielli

Presearch Browser Extension — a faster, easier way to search.

Presearch

10 Principles of Good (UI) Design

Chris R Becker