On 26/10/2016 05:44, Marko Rauhamaa wrote:
BartC <b...@freeuk.com>:

Some people want to work at low level, without needing to drag in a GUI,
and want to do something as simple as finding out if a button has been
pressed on a standard peripheral that nearly every computer has. It
can't be that hard!

I don't consider that to be very low level.

I think working in text mode (character-based display) and a key at a time is enough to be called low-level.

Lower than that would be directly working with the hardware. But it gets more specific as keyboards work in different ways. That's not so useful or interesting.

(I've implemented 'keyboards' both on-screen, and on the surface of digitising tablets (also with a hacked Casio calculator pcb when I couldn't afford a real one). With all of those I was mainly interested in key events, not the details.)

 If you want to get to the
low level, open

   /dev/input/by-id/*-event-kbd

See:

   http://stackoverflow.com/questions/3662368/dev-input-keyboard-format

That's not what I'd call low-level. It's more building a mountain of complexity around something that ought to be straightforward. Apparently when you need to dig very deeply to get through to the fundamentals, that's now called 'low-level'!

--
bartc
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to