# Control your zynthian with a QWERTY (or other) keyboard

**URL:** <https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057>\
**Category:** Software Updates\
**Created:** [June 21, 2019, 4:33pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057 "2019-06-21T16:33:26Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Beltshassar](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/beltshassar/32/684_2.png) [@Beltshassar](https://discourse.zynthian.org/u/Beltshassar)\
**Post date:** [July 21, 2019, 8:01pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/21 "2019-07-21T20:01:10Z")

</div>

I was reading down the thread with exactly that thought in mind.

1+ for the Numeric Keypad - And then a bunch of descriptive stickers 😉

---

<div class="post-metadata">

**Author:** ![hal80](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hal80/32/3876_2.png) [@hal80](https://discourse.zynthian.org/u/hal80)\
**Post date:** [November 5, 2019, 11:28am UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/22 "2019-11-05T11:28:05Z")

</div>

How are the key bindings implemented? If there is a text file (if so, @riban where is it located?) it should be quite easy to adapt an numeric keypad.  
I count 16 keys which are currently assigned. Numeric Keypads have roughly the same number of keys.

regards.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [November 5, 2019, 11:36am UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/23 "2019-11-05T11:36:33Z")

</div>

Sorry. Currently it’s hard-coded in the code … please, create a feature request for this 😉

> **[zynthian/zynthian-issue-tracking](https://github.com/zynthian/zynthian-issue-tracking)**
>
> Centralized Issue Tracking for Zynthian Project. Contribute to zynthian/zynthian-issue-tracking development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![hal80](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hal80/32/3876_2.png) [@hal80](https://discourse.zynthian.org/u/hal80)\
**Post date:** [November 5, 2019, 3:21pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/24 "2019-11-05T15:21:31Z")

</div>

Thank you for the information and link. I created a feature request. (I’m afraid I cannot really contribute to implementing that feature 🤨)

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [November 5, 2019, 5:04pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/25 "2019-11-05T17:04:31Z")

</div>

You made the first step … so you already contributed 😉

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [November 5, 2019, 5:23pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/26 "2019-11-05T17:23:24Z")

</div>

I’ve been particularly impressed by the three switch footswitch I’ve recently bought that defualys to KEys a, b & c . . .probably worth including in the thinking.

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 5, 2019, 10:51pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/27 "2019-11-05T22:51:43Z")

</div>

I like the idea of providing use mappable key binding and wanted to do it but needed to get base implementation done first. I could take a look at implementing this @jofemodo if you want to assign it to me. I may find some time whilst in Australia during next week… if the mother-in-law doesn’t give me too many house maintenance tasks ☹😀

---

<div class="post-metadata">

**Author:** ![wolfpaw98](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/w/ee7513/32.png) [@wolfpaw98](https://discourse.zynthian.org/u/wolfpaw98)\
**Post date:** [November 6, 2019, 4:33pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/28 "2019-11-06T16:33:28Z")

</div>

Just a silly thought: could an IR sensor be added to the RPi and a wireless remote used as a keyboard either on a spare pin or via the I2C route? Does ZynthOS include the LIRC (Linux Infrared Remote Control) library? Could it be added? Or would it be to resource intensive and cause latency?

Here’s a link on how this is already done for a media centre: [https://learn.adafruit.com/using-an-ir-remote-with-a-raspberry-pi-media-center/overview](https://learn.adafruit.com/using-an-ir-remote-with-a-raspberry-pi-media-center/overview)

---

<div class="post-metadata">

**Author:** ![Baggypants](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/baggypants/32/1911_2.png) [@Baggypants](https://discourse.zynthian.org/u/Baggypants)\
**Post date:** [November 6, 2019, 4:42pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/29 "2019-11-06T16:42:15Z")

</div>

You’ve just reminded me I think I have an arduino kit which I think has a small remote in it and probably an ir detector…

---

<div class="post-metadata">

**Author:** ![wolfpaw98](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/w/ee7513/32.png) [@wolfpaw98](https://discourse.zynthian.org/u/wolfpaw98)\
**Post date:** [November 6, 2019, 5:31pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/30 "2019-11-06T17:31:22Z")

</div>

That, of course, is the other solution: using and Arduino or other micro-controller, build a USB based IR receiver to receive the IR signal from the remote and send it to the Zynthian over USB. It’s not quite as elegant as having an IR receiver built into the Zynth, though.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [November 6, 2019, 6:00pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/31 "2019-11-06T18:00:19Z")

</div>

> [@wolfpaw98](#):
>
> Just a silly thought: could an IR sensor be added to the RPi and a wireless remote used as a keyboard either on a spare pin or via the I2C route? Does ZynthOS include the LIRC (Linux Infrared Remote Control) library? Could it be added? Or would it be to resource intensive and cause latency?

Hi @wolfpaw98!

It should be tested, so please, go forward with it. If you have success, we will integrate the IR stack in the official SD, of course 😉

Regards,

---

<div class="post-metadata">

**Author:** ![Baggypants](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/baggypants/32/1911_2.png) [@Baggypants](https://discourse.zynthian.org/u/Baggypants)\
**Post date:** [November 6, 2019, 11:30pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/32 "2019-11-06T23:30:42Z")

</div>

I was just going to nick the bits out of the kit tbh.

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 6, 2019, 11:37pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/33 "2019-11-06T23:37:05Z")

</div>

I don’t think IR receiver should add too much load so worth a try. I have a few IR receiver chips in a drawer. I have one connected to a RPi2 vompclient (video streamer) which worked well. I am not a fan of IR - it is prone to interference. I never used it on my SoundCanvas but each to their own.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [November 6, 2019, 11:39pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/34 "2019-11-06T23:39:00Z")

</div>

I agree @riban!  
It shouldn’t be a problem for the RBPi to manage the IR without causing problems or increase latency 😉

---

<div class="post-metadata">

**Author:** ![Baggypants](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/baggypants/32/1911_2.png) [@Baggypants](https://discourse.zynthian.org/u/Baggypants)\
**Post date:** [November 6, 2019, 11:39pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/35 "2019-11-06T23:39:35Z")

</div>

Zynthian D-Beam!

---

<div class="post-metadata">

**Author:** ![wolfpaw98](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/w/ee7513/32.png) [@wolfpaw98](https://discourse.zynthian.org/u/wolfpaw98)\
**Post date:** [November 12, 2019, 2:40am UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/36 "2019-11-12T02:40:37Z")

</div>

Well I’ve managed add an ir receiver to the RBPi and figure out how to turn ir-gpio on in both Buster and Stretch. I’ve got the Zynthian (via ssh) to recognize and receive ir scancodes and interpret them as buttons pressed (in the case below, the OK button was pressed) like this:

> 9393.880015: lirc protocol(nec): scancode = 0x40  
> 9393.880033: event type EV\_MSC(0x04): scancode = 0x40  
> 9393.880033: event type EV\_KEY(0x01) key\_down: KEY\_OK(0x0160)  
> 9393.880033: event type EV\_SYN(0x00).  
> 9393.930014: lirc protocol(nec): scancode = 0x40 repeat  
> 9393.930025: event type EV\_MSC(0x04): scancode = 0x40  
> 9393.930025: event type EV\_SYN(0x00).  
> 9394.060062: event type EV\_KEY(0x01) key\_up: KEY\_OK(0x0160)  
> 9394.060062: event type EV\_SYN(0x00).

What I found out is that ir-gpio has replaced lirc and is included as part of the linux kernel. It’s reasonably straightforward to set up. Once set up, ir scancodes can be read by ir-keytable, but I have no idea how to bind these scancodes to keystrokes recognized by the Zynthian app. I’m not a coder. I’m surprised I got this far! Any suggestions? Is this worth pursuing?

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [November 12, 2019, 3:26am UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/37 "2019-11-12T03:26:15Z")

</div>

I think we could use something like:

> **[kyoto/sendkeys](https://github.com/kyoto/sendkeys)**
>
> Send key presses to open applications in X Windows (GNOME, KDE, Unity, etc.) - kyoto/sendkeys

for translating the remote events to standard keyboard events.

Regards …

---

<div class="post-metadata">

**Author:** ![BrainStormer](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@BrainStormer](https://discourse.zynthian.org/u/BrainStormer)\
**Post date:** [November 12, 2019, 6:25am UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/38 "2019-11-12T06:25:02Z")

</div>

or could we learn the codes like we do for midi controllers?

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [November 12, 2019, 1:35pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/39 "2019-11-12T13:35:41Z")

</div>

Then we would need a “jack client” that receive the remote events and generate MIDI events …  
Really funny to program … you could take this as inspiration:

> **[lirc-midi-node](https://www.npmjs.com/package/lirc-midi-node)**
>
> A very simple LIRC to MIDI bridge program

Regards,

---

<div class="post-metadata">

**Author:** ![mheidt](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/mheidt/32/773_2.png) [@mheidt](https://discourse.zynthian.org/u/mheidt)\
**Post date:** [November 13, 2019, 10:22pm UTC](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057/40 "2019-11-13T22:22:02Z")

</div>

is the new keyboard binding feature capable of mapping midi message to those actions as well?

[Previous page](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057.md?page=1)

[Next page](https://discourse.zynthian.org/t/control-your-zynthian-with-a-qwerty-or-other-keyboard/3057.md?page=3)
