-1

I would like to know the frequency of performed actions when I long-press the keyboard shortcut CTRL + Z (a.k.a. Undo).

To be specifically clear, when I write a large chunk of text or code in my text editor, if I long-press the CTRL + Z shortcut to the point where I undo everything, what is the frequency of word deleted along the overall action? And how word or batch of word are chosen for deletion (sometimes it's one word each, sometimes more)?

ggrelet
  • 303

1 Answers1

0

The CTRL + Z will be sent at the keyboard repetition rate as set.

The "undo" function itself is handled by whatever program has focus at the time and it may discard or otherwise ignore keystrokes while it is handling previous keystrokes depending on how it is programmed. This means that the repeat rate set by the operating system may or may not be honoured by the program. The program may choose to only honour the repeat keystrokes as long as the keys are held down and as fast as it can actually apply undo operations.

Applying undo operations will depend on CPU speed, program complexity, programming language and also amount of data in the buffer and how much is removed or added.

The operating system has no say or ability to determine exactly how the program implements "undo", all the operating system can do is tell the program that keystrokes were received.

How the program handles undo is up to the program. There might be a time scale where certain actions are grouped, or there might be certain characters that alter behaviour. This is not going to be the same for every editor, though certain programming frameworks might have common facilities or methods for things like textboxes.

Mokubai
  • 95,412