event.shiftKey
is a boolean. true
if the Shift key is being pressed, false
if not. altKey
and ctrlKey
work the same way.
So basically you just need to detect the keydown as normal with onkeydown
, and check those properties as needed.
More Related Contents:
- How to do this mouse over effect in jquery?
- Find Sum of Two Numbers Using JavaScript in 1st one is manual entry and 2nd one is depend
- Javascript: Decimals still being allowed in regex check for numbers [duplicate]
- Total sum is NaN – Javascript
- Creating a JavaScript global array with static elements?
- What’s the difference between using “let” and “var”?
- jQuery document.createElement equivalent?
- Issue in returning data retrieved from DB queries called in the loop
- facebook social plug-in not showing up when added dynamically
- Passing environment-dependent variables in webpack
- SyntaxError: Unexpected token o in JSON at position 1
- Is there a jQuery autogrow plugin for text fields?
- How to get class object’s name as a string in Javascript?
- Skip arguments in a JavaScript function
- How to add anything in through jquery/javascript?
- Nodejs express and promises not doing what I expect
- How to retrieve the element where a contextmenu has been executed
- How to create an array in JavaScript whose indexing starts at 1?
- Background tasks in Meteor
- Node.js Sass version 7.0.0 is incompatible with ^4.0.0 || ^5.0.0 || ^6.0.0
- JavaScript, elegant way to check nested object properties for null/undefined [duplicate]
- Stop javascript Date function from changing timezone offset
- Is there a difference between `new Image()` and `document.createElement(‘img’)`?
- Fix the upstream dependency conflict installing NPM packages
- Bizarre console.log behaviour in Chrome Developer Tools [duplicate]
- hide div if clicked outside of it [duplicate]
- Group javascript array object by same key
- Cannot connect to MongoDB because of wrong URI
- creating highchart with ajax json data
- How to implement a Typescript interface to an es5-style “class”?