BlueWave Studio forum
Change keyboard input in OAP - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: User interface (https://bluewavestudio.io/community/forum-66.html)
+--- Thread: Change keyboard input in OAP (/thread-3776.html)



Change keyboard input in OAP - alwaysbroken - 04-11-2023

Good Day,
I'm setting up a Raspberry Pi 4 to run OAP with no touchscreen. I will be mapping 6 keys via GPIO OR Bluetooth to an existing button on my dash. I will be limited to the 6 buttons on the steering wheel (PAD Up, Down, Left, Right, Back, Enter). Now I have been bench testing and I could successfully run AA with the keyboard keys 1, 2, Left, Right, Enter, Esc. Left/Right to move into groups, 1/2 to select items within groups, etc.

The issue is when I go back to OAP, Left & Right basically becomes useless. I'd have to navigate using the Kboard (Up,Down,1,2,Enter, Esc). With this, I wouldn't be able to map them as-is to the 6 buttons on the PAD.

How can I change OAP to use the same keys as AA?


RE: Change keyboard input in OAP - Daniel_BlueWave - 04-11-2023

List of supported keystrokes is here: https://bluewavestudio.io/community/thread-2048.html
OAP and AA are using the same keys for functionalities.


RE: Change keyboard input in OAP - alwaysbroken - 04-11-2023

(04-11-2023, 05:33 AM)Daniel_BlueWave Wrote: List of supported keystrokes is here: https://bluewavestudio.io/community/thread-2048.html
OAP and AA are using the same keys for functionalities.

Thank you but I have already seen that guide.

On my setup, AA and OAP are definitely not the same. On AA, Up/Down does nothing. On OAP, Left/Right does nothing.
Do you know which file/s I have to edit in order to manipulate it?


RE: Change keyboard input in OAP - Randy2576 - 04-25-2023

I read something about that just today. You are correct, the left/right keys do nothing and it hasn't been changed in the keystrokes guide. Keys "1" and "2" are mapped for left/right. A request was made to change the mapping of those keys to the left/right arrow keys, but obviously that hasn't happened.

Would be nice to have the option of custom mapping the keyboard.


RE: Change keyboard input in OAP - grey - 07-30-2023

(04-25-2023, 05:27 AM)Randy2576 Wrote: I read something about that just today.  You are correct, the left/right keys do nothing and it hasn't been changed in the keystrokes guide.  Keys "1" and "2" are mapped for left/right.  A request was made to change the mapping of those keys to the left/right arrow keys, but obviously that hasn't happened.

Would be nice to have the option of custom mapping the keyboard.

It would be nice to have some custom keymapping like the Autokit APK has for the CarPlay dongle, but I came up with a kind of barbaric solution that has worked so far for me. 

This involves editing the default keyboard configuration, so your left and right arrow keys will no longer work as left and right arrow keys in the OS, but OAP will treat them as 1 and 2 so you can move left and right inside of OAP. 

sudo nano /usr/share/X11/xkb/symbols/pc

In the bottom section of this file, you will find the functions that correspond to the arrow keys when pressed. You just need to edit the left and right keys as shown below.

    key   <UP> {        [  Up                   ]       };
    key <LEFT> {        [  KP_1                 ]       };
    key <DOWN> {        [  Down                 ]       };
    key <RGHT> {        [  KP_2                 ]       };