The Emacs elisp API does not allow you to get information about how long a key has been pressed, and if it is still pressed.
Emacs work not only in GUI mode, but also in terminals where this information is not available (because the hardware does not support it).
So GNU Emacs is written in such a way that it cannot pull out such information.
If you want a more complete response to emacs-devel@gnu.org , but be careful not to do offtopic. help-gnu-emacs@gnu.org is the main list for Emacs questions.
Also check: EmacsMailingLists EmacsNewsgroups
StackOverflow is not a good site for a question about the internal components of Emacs ...
source share