LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Bluetooth multimedia controller (https://www.linuxquestions.org/questions/linux-software-2/bluetooth-multimedia-controller-4175667129/)

jevgienij 01-05-2020 05:57 AM

Bluetooth multimedia controller
 
1 Attachment(s)
I have this cheap bluetooth multimedia controller. The device is paired properly and the key presses are recognised (play/pause key in the example below):

Code:

[root] [~] # showkey
kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...

keycode 164 press
keycode 164 release

How do I make this key press execute a shell command? I'm doing all this on an embedded device (Orange Pi) but I think that's not the problem here. The problem is that I don't have a direct screen nor keyboard connection to the machine. I only got a serial console and ssh. There is no any X window system and all the possible solutions I've found so far were for GUI Linux only. What can I do? I think this must be possible some way, considering that the OS can see the key presses.

Tonus 01-05-2020 01:52 PM

Bluetooth multimedia controller
 
Don't you have to revert that?
A daemon that would be listening on standard input?


All times are GMT -5. The time now is 06:06 AM.