JavaScript Tutorial 32 - Keyboard events in JavaScript

preview_player
Показать описание

This video explains how to use keyboard events in JavaScript.
Рекомендации по теме
Комментарии
Автор

Just used your tutorial to complete the extra credit story for the capstone Calculator project for an The Odin Project course. Love that you are concise, do a verbal and on-screen follow along that is completely in sync, and your soft voice. Thank you for the help!

brandonespinosa
Автор

Thanks for this information, this was very helpful in clarifying some material I was not very clear on. Also the walk through of your material was easy to follow along with.

Wolfknightx
Автор

Daaaamn Daniel !!, thank you so much for this video :D

aminelagab
Автор

Thank you! you've saved my life ;D

Isaqueish
Автор

That is the loudest spacebar I have ever heard

jupop
Автор

Can anyone explain me why we need to put "false"? What does it mean "so it's not returning anything to the program"?

ratubs
Автор

Thank you!
Your video has been a great help for me.

aadarshsingh
Автор

If u hold alt and press 1 on the number pad ( yes u need a number PAD) you'll get a smiley face, does JavaScript still recognize it

atreyugantt
Автор

you were the only one that got what i was looking for thanks so much

Tens_
Автор

What is the window? Add event listener?

kyliestaraway
Автор

Do you know how to detect when a key is hold for x seconds?

jackdo
Автор

how can i write in textbox using key simulation.

citizengaming
Автор

ma man you hooked me up Ima overdose now :p

nubcops
Автор

I created a virtual whistle with 6 finger holes and my plan was to assign a keyboard key to each hole and have the background color of the hole change when the corresponding key is pressed. I was able to follow your tutorial and get the alert window to fire, so I know the function is working. But when I try to use this function to change the CSS of my variable, I get this error message in my console, "Uncaught TypeError: Cannot read property 'style' of null
at checkKeyPress" What am I doing wrong here? is it just a simple syntax error I'm not seeing? You would think if an alert works, that a simple .style change would also work easily!



<script>
var leftIndex
leftIndex =
window.addEventListener("keydown", checkKeyPress, false);

function checkKeyPress(k){
if (k.keyCode == "70"){
= "green";
}
}

</script>

pattyorigami
Автор

open new page in new window using hover effect plz reply

HTETEXAM-pfwl
Автор

hi how to disable the keyboard keys on windows

harishkumar
Автор

i want javascript form validation with submitting the form

gangineni-oxwe
Автор

although this is old i am having trouble with my F key and have been given
keyup keyCode=70 (F) which=70 (F) charCode=0
shiftKey=false ctrlKey=false altKey=false metaKey=false
key=f char=undefined location=0 repeat=false
keyIdentifier=undefined keyLocation=undefined
and idk what it means or how to Fix it

darkmars_
Автор

Your video is great help, however am struggling to add another key code that performs another shortcut, (am using keyboard shortcuts for a JavaScript video player)

aquamahmood
Автор

F5 key should not work even after URL has been selected

harishkumar