Questions tagged [keyboard-events]

An event that is triggered when a Key is pressed on a keyboard input device

A KeyboardEvent is an event that is triggered when a Key is pressed on a keyboard input device. The event will contain information relating to the particular key that was pressed, how long the key was pressed for, and whether any modifier keys were also pressed (such as Ctrl or Alt).

2201 questions
0
votes
1 answer

Update variable with keyboard and multithreading in python

I have a program with this structure: variable_to_update = 1000 while True: # this must be running in an infinite loop do_something(variable_to_update) In some specific moments I need to update the variable variable_to_update with my…
ljuk
  • 701
  • 3
  • 12
0
votes
1 answer

Detecting space bar with keyboad.read_key() in Python

Hi I need help in detecting the space bar when pressed. My program listed below wont detect the space bar. I wont to put the contents of a text file on the screen and then copy that text by typing it - so when I press the corresponding key the…
Chris
  • 1
  • 1
0
votes
1 answer

Best way to listen for cmd + shift + z and cmd + z using javascript

I am trying to implement redo and undo in a browser. I have a solution that works, but it sometimes misinterprets the redo sequence as undo, whereas this never happens, for example, in vscode. My code is as follows: document.addEventListener( …
adam tropp
  • 674
  • 7
  • 22
0
votes
1 answer

Mouse click/keyboard press event in AnguarJS

function getNumberOfStores() { $http.get("api/Stores/getAll").then(function(response) { $scope.data = response.data; var time = new Date(); window.localStorage.setItem("loadedTime", time); }); } I have a function to…
HappySnowman
  • 109
  • 1
  • 1
  • 8
0
votes
2 answers

how active two keyboard events esimultanialy

I'm trying to execute two javascript functions: