- Posts: 12160
- Thank you received: 0
Control panel, MUX wiring help
phillc54 wrote: I think the keyboard module requires root.
Seems so but I think It just gets the keys using a program called dump. You could try saving the dump to a text file and using that.
But also pyAutoGUI seems to do the same thing.
pyautogui.readthedocs.io/en/latest/#
Man the last time I played with this stuff it was in the DOS days.
Please Log in to join the conversation.
andypugh wrote:
rodw wrote: I have not tried this but:
You should be able to write a component in Python to "stuff" data (single character or a string) into the keyboard buffer.
The first version of matrix_kb had this capability. But it did it by calling external kernel routines, and there was a worry that we had no way to know that these were thread-safe so it was taken out.
This commit is where I removed that code:
github.com/LinuxCNC/linuxcnc/commit/b494...c3b3790a457e1ed354c8
So if that was all put in a separate userspace component, the matrix_kb could look (partially) like a standard keyboard to the OS.
(In a userspace component there is no need to worry about thread safety)
I wonder how this would be treated in PREMPT_RT? I thought it basically removed any non-thread safe code.
Please Log in to join the conversation.
rodw wrote: I wonder how this would be treated in PREMPT_RT? I thought it basically removed any non-thread safe code.
userspace HAL components (In C and Python) work in all supported realtime systems.
Please Log in to join the conversation.
Auto types "Hello World" If you Select a text editor, it still types happily away
There seems to be a lot more you can do.
This is cool too
It would be pretty easy from here to make it a real keyboard...
Please Log in to join the conversation.
Please Log in to join the conversation.
I even had a prox limit switch connected via an STMBL drive typing the letter "c" in the terminal.
But then I broke it again, but it seems that it will work.
Watch this space.
Please Log in to join the conversation.
andypugh wrote: I even had a prox limit switch connected via an STMBL drive typing the letter "c" in the terminal.
But then I broke it again, but it seems that it will work.
Watch this space.
So was it C for Curious or C for Cool?
Sounds exciting either way! I have a circuit board here waiting on one part before it turns into a shield for the 7i73... well hoping a mate will turn it into said shield cos he's much more into SMD soldering than I am!
Please Log in to join the conversation.
Mark
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22012
- Thank you received: 3
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Please Log in to join the conversation.
