Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for KeyboardEvent.
Dictionary 0
This corpus is unavailable: timeout
Papers 0
This corpus is unavailable: timeout
Developer library 6
Desktop mouse and keyboard controls
` and `keyup` events and act accordingly in both handler functions. Inside them we can get the code of the key that was pressed from the [`code`](/docs/Web/API/KeyboardEvent/code) property of the event object, see which key it is, and then set the proper variable. The codes are all readable string names, but you can [look them up](/docs/Web/API/UI_Events/Keyboard_event_code_values) to be sure; `"ArrowLeft"` is the le
Challenge: Adding features to our bouncing balls demo
; break; } }); ``` This adds a `keydown` event listener to the `window` object so that when a key is pressed, the event object's [`key`](/docs/Web/API/KeyboardEvent/key) property is consulted to see which key is pressed. If it is one of the four specified keys, then the evil circle will move left/right/up/down. ### Defining methods for EvilCircle The `EvilCircle` class should have three methods, as describ
User input methods and controls
gic to be executed when the `keydown` and `keyup` events are fired. > [!NOTE] > See the [DOM events](/docs/Web/API/Document_Object_Model/Events) guide and the KeyboardEvent reference to find out more about keyboard events. ### Mouse You can also capture mouse and other pointer events. The events occurring when the user interacts with a pointing device such as a mouse are represented by the MouseEvent DOM Interface
Introduction to events
dd extra properties that are relevant to that particular type of event. For example, the keydown event fires when the user presses a key. Its event object is a KeyboardEvent, which is a specialized `Event` object with a `key` property that tells you which key was pressed: ```html <input id="textBox" type="text" /> <div id="output"></div> ``` ```js const textBox = document.querySelector("#textBox"); const output = d
HTML: A good basis for accessibility
o the `document` object to detect when a button has been pressed on the keyboard. We check what button was pressed via the event object's [`key`](/docs/Web/API/KeyboardEvent/key) property; if the key pressed is <kbd>Enter</kbd>/<kbd>Return</kbd>, we run the function stored in the button's `onclick` handler using `document.activeElement.click()`. [`activeElement`](/docs/Web/API/Document/activeElement) which gives us t
Firefox 118 release notes for developers
s://bugzil.la/1845461)). ### APIs - The <kbd>⊞ Windows Logo</kbd> key on Windows and the <kbd>Command</kbd> key on macOS now return a value of `"Meta"` for [`KeyboardEvent.key`](/docs/Web/API/KeyboardEvent/key), instead of `"OS"`, and [`KeyboardEvent.code`](/docs/Web/API/KeyboardEvent/code) returns `MetaLeft`/`MetaRight` instead of `OSLeft`/`OSRight` (Firefox bug [1232918](https://bugzil.la/1232918)). - The RTCRtpT