unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Grabbing all events in a frame (with xelb?)
@ 2019-03-02 15:42 Lars Ingebrigtsen
  2019-03-03  3:26 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-03-02 15:42 UTC (permalink / raw)
  To: emacs-devel

If I say

(track-mouse (read-event))

I get pretty much all the events, but I don't get things like "the shift
key has been pressed".

Is there a way to get low-level events like that "natively" in Emacs?

If not, does anybody know whether one could use the xelb/xcb library to
do something like that?  I've tried looking at the exwm window manager,
and the answer seems to be "yes", although I've been unable to whip up a
simple, minimal way to, er, xcb:GrabKey and then get the events...

Is there a xelb mailing list?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Grabbing all events in a frame (with xelb?)
  2019-03-02 15:42 Grabbing all events in a frame (with xelb?) Lars Ingebrigtsen
@ 2019-03-03  3:26 ` Stefan Monnier
  2019-03-05 21:01   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2019-03-03  3:26 UTC (permalink / raw)
  To: emacs-devel

> Is there a way to get low-level events like that "natively" in Emacs?

Now without C-level changes, AFAIK.  But those changes are pretty simple
(I used to have a patch that added such <key>-up events, treated a bit
like the down-mouse-N events).


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Grabbing all events in a frame (with xelb?)
  2019-03-03  3:26 ` Stefan Monnier
@ 2019-03-05 21:01   ` Lars Ingebrigtsen
  2019-03-08  6:08     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-03-05 21:01 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Is there a way to get low-level events like that "natively" in Emacs?
>
> Now without C-level changes, AFAIK.  But those changes are pretty simple
> (I used to have a patch that added such <key>-up events, treated a bit
> like the down-mouse-N events).

Thanks; sounds like that might be useful generally in Emacs?  Any reason
you didn't push that patch?  :-)

I've now made things work for my use case by using the xelb/xcb library
and popping up transparent non-Emacs windows and stuff.  It works, but a
pure Emacs-frame solution would be nice.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Grabbing all events in a frame (with xelb?)
  2019-03-05 21:01   ` Lars Ingebrigtsen
@ 2019-03-08  6:08     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2019-03-08  6:08 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

>>> Is there a way to get low-level events like that "natively" in Emacs?
>> Now without C-level changes, AFAIK.  But those changes are pretty simple
>> (I used to have a patch that added such <key>-up events, treated a bit
>> like the down-mouse-N events).
> Thanks; sounds like that might be useful generally in Emacs?  Any reason
> you didn't push that patch?  :-)

Can't remember exactly.  It adds a fair bit of "noise" to view-lossage
and might introduce some breakage in some cases because of the
unexpected new events.

I can try and dig up the patch if you're interested (it was not cleaned
up but worked well enough not to get in the way of my personal use tho
I never ended up writing code that took advantage of it).


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-08  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-02 15:42 Grabbing all events in a frame (with xelb?) Lars Ingebrigtsen
2019-03-03  3:26 ` Stefan Monnier
2019-03-05 21:01   ` Lars Ingebrigtsen
2019-03-08  6:08     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).