[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regarding on-key-up event
From: |
Eli Zaretskii |
Subject: |
Re: Regarding on-key-up event |
Date: |
Sat, 04 Feb 2023 09:09:15 +0200 |
> From: Ag Ibragimov <agzam.ibragimov@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 03 Feb 2023 17:45:20 -0600
>
> > Yes, you can "register" an on-release event, just not for modifier
> > keys like Shift or Alt.
> >
>
> Wait, really? Are you saying that aside the modifier keys, it's possible to
> let's say
> bind a command to a key e.g., (kbd "a"), so when a user presses the key,
> it would to run one command, but when the key is released to run a
> different command?
No. I already said that Emacs only receives a key when it is
released. So we can have on-key-release events, but not on-key-press
events. And pressing and release only a modifier key, such as Alt,
doesn't normally deliver any key event to Emacs.
> > While you hold a key, a typical keyboard auto-repeats, so I see no
> > problem here.
>
> Right, it would auto-repeat, registering a sequence of "key-pressed"
> events, but can we detect when the key gets released?
The key-pressed events are actually key-release events, see above.
- Re: Regarding on-key-up event, (continued)
- Re: Regarding on-key-up event, Ag Ibragimov, 2023/02/03
- Re: Regarding on-key-up event, Eli Zaretskii, 2023/02/03
- Re: Regarding on-key-up event, Konstantin Kharlamov, 2023/02/03
- Re: Regarding on-key-up event, Konstantin Kharlamov, 2023/02/03
- Re: Regarding on-key-up event, Po Lu, 2023/02/03
- Re: Regarding on-key-up event, Ag Ibragimov, 2023/02/03
- Re: Regarding on-key-up event, Po Lu, 2023/02/03
- Re: Regarding on-key-up event, Eli Zaretskii, 2023/02/04
- Re: Regarding on-key-up event, Ag Ibragimov, 2023/02/03
- Re: Regarding on-key-up event, Po Lu, 2023/02/03
- Re: Regarding on-key-up event,
Eli Zaretskii <=
- Re: Regarding on-key-up event, chad, 2023/02/04