How do I make Gnome Shell under Wayland ignore an input device?

Under X, it’s trivial to ignore a specific input device.

# Disable the Gryphon barcode scanner "keyboard"
for id in `xlist Datalogic`; do
    xinput float $id
done

Is there a way to do this under Wayland? Note that I don’t want to disable the device — I’m parsing (via a program) the output from it, and I just want Gnome to ignore it.

That’s the question, but here’s the background:

I have an Emacs-based package for keeping track of my books. It’s ISBN based, but nobody wants to punch all those numbers by hand, so I use this nice thing:

It’s a cordless Datalogic QuickScan barcode scanner (expertly wrapped with some gaffa, as such things should be), and it appears as a normal USB HID keyboard in Linux.

So when I scan something, the sequence of “9780062309686 ENTER” appears, as if from a normal keyboard.

Now, if I’m in a bookiez buffer in Emacs, everything works automatically. But I want this scanner to work no matter what program has focus. That way I can just pick up the scanner (that’s on the table in the hall) when I’ve bought a new book, and just *BEEP* the book without interacting with the computer at all otherwise — giving the right programme focus, etc.

To do this, I basically parse the output from libinput, and that’s trivial to do, and I’ve been doing this stuff for a decade. And as I said at the top, it’s trivial to make X ignore the device, but how to do this on Wayland, under Gnome Shell?

Because this is kinda crap:

After googling a bit, I found a gazillion people asking the same question, and the solution they found was to use udev to disable the device completely. Which isn’t what I want — I want to have it enabled, but ignored by Wayland.

I also asked ChatGPT, and it told me to go fuck myself:

Surely Wayland has a way to do something this basic without *gurgle*. Surely!.

SURELY!!!

[edit a bit later]

D’oh! I missed this output from ChatGPT — this does indeed seem to kinda sorta work in my use case… I mean, it’s a gross hack and all, but…

SO NEVER MIND

TSP2021: The Storms of Jeremy Thomas

This seems like such a weird movie. It’s a hagiography of a film producer? Who was the son of the person who did the Carry On movies?!

And he has really British cars!? What is this!

This is really well done, but I don’t know nothing about this producer and what movies he’s gotten made. And the more I watch clips from them I’m going “oh, he’s basically doing what his father and uncle were doing — only more artier”. That is, there’s a lot of Totes Serious And Not Funny Movies But With Boobs.

All those movies by directors where you’re going… “well, that was kinda embarrassing”. You know, Bertolucci movies. It seems like that’s his specialty.

OK, I’m a guy who detests documentaries. If you want to tell people something, can’t you just write a blog post? (Yes yes I know.)

But this is like the ideal documentary for me. You don’t get any talking heads (except Tilda Swinton) talking about the subject, and then it’s just this guy filming this other guy and asking him awkward questions.

And he doesn’t ask him “did you think having Art Garfunkel as the lead in a movie was a good idea?” No, instead he asks him to word associate on “mother”.

It’s great!

After watching this movie, I have a vague idea that Jeremy Thomas produced pretty much all the most dire “serious” movies of the 80s and the 90s — think Roeg and Bertolucci — and then did other really dire movies.

Let’s check whether that’s correct, because this documentary doesn’t really get into the details…

Yes! All those movies! I even like some of them, but they’re certainly… a thing…

So, I really enjoyed this documentary, and for every single clip they showed of a Thomas-produced movie, I disliked him a bit more. Fantastic! How on Earth did this get made!?

The Storms of Jeremy Thomas. Mark Cousins. 2021.

This post is part of The Tilda Swinton Project.