F5F Stay Refreshed Software Operating Systems Configuring a secondary keyboard to function as a soundboard in Linux

Configuring a secondary keyboard to function as a soundboard in Linux

Configuring a secondary keyboard to function as a soundboard in Linux

K
KyaTheKid
Junior Member
20
12-01-2016, 04:16 AM
#1
I've been working on setting up a second keyboard as a soundboard in Manjaro for the last couple of days but haven't managed to get it right. I've tried using actkbd to capture keypresses only from the second keyboard and then executed the play command via sox to attempt playing sounds. However, I encountered an error: ALSA lib pcm_dmix.c:1089Sadsnd_pcm_dmix_open) unable to open slave. Initially, I assumed it was an issue with running in root, so I changed the command to use sudo and played /soundboard/message.mp3, but the same error persisted. When I tried playing the file manually from the terminal, it worked fine. Other sound libraries also produced the same problem. I've even tested a small Python script, but it didn't resolve the issue. I'm looking for someone who can help me figure out a solution. Thanks, Roy.
K
KyaTheKid
12-01-2016, 04:16 AM #1

I've been working on setting up a second keyboard as a soundboard in Manjaro for the last couple of days but haven't managed to get it right. I've tried using actkbd to capture keypresses only from the second keyboard and then executed the play command via sox to attempt playing sounds. However, I encountered an error: ALSA lib pcm_dmix.c:1089Sadsnd_pcm_dmix_open) unable to open slave. Initially, I assumed it was an issue with running in root, so I changed the command to use sudo and played /soundboard/message.mp3, but the same error persisted. When I tried playing the file manually from the terminal, it worked fine. Other sound libraries also produced the same problem. I've even tested a small Python script, but it didn't resolve the issue. I'm looking for someone who can help me figure out a solution. Thanks, Roy.

P
pocio77
Posting Freak
783
12-01-2016, 07:31 AM
#2
This project is quite outdated, with the latest commit over six years back and references to Linux 2.6. I wouldn't feel confident about it. Avoid audio tasks while running as root or using sudo—those are risky. If you need a dedicated service, consider something actively maintained instead. What version of Manjaro are you running? Most desktop apps come with a convenient shortcut manager, which could be a better option.
P
pocio77
12-01-2016, 07:31 AM #2

This project is quite outdated, with the latest commit over six years back and references to Linux 2.6. I wouldn't feel confident about it. Avoid audio tasks while running as root or using sudo—those are risky. If you need a dedicated service, consider something actively maintained instead. What version of Manjaro are you running? Most desktop apps come with a convenient shortcut manager, which could be a better option.

W
Ward12
Posting Freak
895
12-01-2016, 08:27 AM
#3
Thank you for your message. It seems you're using Manjaro 18.1.5 and encountering issues with the sxhkd daemon not responding to keyboard-specific inputs. The problem appears to be related to how the daemon handles keyboard shortcuts, as it's not listening on one keyboard at a time. You also checked the Shortcut Manager but found no support for this feature. It might be worth reviewing the sxhkd documentation or checking for updates to ensure compatibility.
W
Ward12
12-01-2016, 08:27 AM #3

Thank you for your message. It seems you're using Manjaro 18.1.5 and encountering issues with the sxhkd daemon not responding to keyboard-specific inputs. The problem appears to be related to how the daemon handles keyboard shortcuts, as it's not listening on one keyboard at a time. You also checked the Shortcut Manager but found no support for this feature. It might be worth reviewing the sxhkd documentation or checking for updates to ensure compatibility.

X
Xipphos
Junior Member
36
12-01-2016, 12:47 PM
#4
Consider a tailored mapping with xmodmap and assign all keys on the second keyboard to obscure Unicode characters, then connect those symbols to your desired shortcuts. This method should let sxhkd function despite using symbols instead of standard keycodes.
X
Xipphos
12-01-2016, 12:47 PM #4

Consider a tailored mapping with xmodmap and assign all keys on the second keyboard to obscure Unicode characters, then connect those symbols to your desired shortcuts. This method should let sxhkd function despite using symbols instead of standard keycodes.

A
androidp67
Junior Member
13
12-06-2016, 05:33 AM
#5
I checked the message you received and believe it was about XKB rather than xmodmap. The issue I’m facing now is whether it’s possible to input Russian or Chinese characters directly into the second keyboard. (This is something I won’t use.)
A
androidp67
12-06-2016, 05:33 AM #5

I checked the message you received and believe it was about XKB rather than xmodmap. The issue I’m facing now is whether it’s possible to input Russian or Chinese characters directly into the second keyboard. (This is something I won’t use.)

A
akjosh47
Member
190
12-07-2016, 07:22 AM
#6
Perhaps? In theory it could work, though I’m unsure about an automatic solution. You might try XKB instead of xmodmap and write a Python script to create the right bindings. There could be ready-made mappings you can adapt by adjusting the regex to fit your device.
A
akjosh47
12-07-2016, 07:22 AM #6

Perhaps? In theory it could work, though I’m unsure about an automatic solution. You might try XKB instead of xmodmap and write a Python script to create the right bindings. There could be ready-made mappings you can adapt by adjusting the regex to fit your device.

D
Deerhunter54
Junior Member
6
12-10-2016, 03:17 AM
#7
Use xinput to display available devices. On Manjaro, install xorg-xinput first. Then apply setxkbmap with the device ID to configure it in Russian. For a keymap overview, run localectl list-x11-keymap-layouts or use autokey with a GUI. System command example: system.exec_command("command")
D
Deerhunter54
12-10-2016, 03:17 AM #7

Use xinput to display available devices. On Manjaro, install xorg-xinput first. Then apply setxkbmap with the device ID to configure it in Russian. For a keymap overview, run localectl list-x11-keymap-layouts or use autokey with a GUI. System command example: system.exec_command("command")