Keyrah V3 and Strange A500 keyboard Caps Lock activity in Linux only

Caution: Non registered users only see threads and messages in the currently selected language, which is determined by their browser. Please create an account and log in to see all content by default. This is a limitation of the forum software.


Also users that are not logged in can not create new threads. This is a, unfortunately needed, counter measure against spam. Please create an account and log in to start new threads.

Don't Panic. Please wash hands.
  • Hi,


    I have just purchased the Keyrah V3, and am extremely grateful that this hardware exists to allow me to combine 30+ year old tech with modern day equipment.


    I am currently building an A500 Maxi of my own, and have a working A500 keyboard attached via Keyrah to a Raspberry Pi 4.


    Firstly, I just want to be clear that I know there is not a hardware fault with the Keyrah V3 or the A500 keyboard. The A500 keyboard when connected to my Windows PC works flawlessly.


    The quirky issue I have is when attached to the Pi:


    • When the caps lock is off (LED off) and I type, lowercase letters are produced as expected.
    • If I hold the shift key down, still with Caps Lock off, uppercase characters are produced as expected.
    • When I put the Caps Lock on, I get a mixture of uppercase and lowercase letters, for example pressing the keys 'a', 'b' and 'c', may well output AbC.

    As I say this activity is ONLY happening with the Pi and Linux distros.


    What I have done so far to test the hardware etc is fine:

    • Connected to Windows PC - everything is fine, and every test combination with Caps Lock on or off works
    • Tried two different Raspberry Pi 4 devices - same result
    • Tried two different distros of Linux - Ubuntu and DietPi - same result
    • Tried connecting the Keyrah device to the Pi via a powered USB Hub to rule out power issues with the Pi. - same result

    The above suggests there is no hardware issue with Keyrah, the A500 keyboard or the Pi(s), it seems a possible software/firmware issue, or I am being realy stupid and doing something wrong!


    Any help would be greatly appreciated.


    Thanks


    Andy

  • That sounds seriously weird - I am doing all my work and testing on Linux here (not on a raspi obviously =)) and it worked for me...


    I could imagine this is a power issue... can you try another PSU?


    Also, does the caps-lock LED flicker somehow? There is some logic in the Keyrah Software that makes the caps-lock state of the keyrah keyboard "follow" the caps-lock state that is reported by the OS via the keyboard LEDs (which may change by using a second keyboard). Could you try plugging in another USB keyboard at the same time, and check what happens when you use caps-lock on it?

  • Thanks for getting back to me and sorry for the delay in replying.


    Ok, so I have connected the Keyrah directly to the Pi again (taking it away from the powered hub) and changed the power supply to the Pi using the same PSU that drives my laptop. Unfortunately the result is the same result :-( The Caps lock light stays on, zero flicker.


    Plugging in a standard USB keyboard in parallel gives some interesting results:

    • If I put the caps lock on the USB keyboard it types uppercase as expected, but does not trigger the caps lock LED on either the USB keyboard or the LED on the Amiga keyboard.
    • If I switch caps lock on the Amiga keyboard. The Amiga keyboard stays lit and I get the same output of mixed upper and lowercase when typing on both the USB keyboard and the Amiga Keyboard. Again though, no caps lock light on the USB keyboard.
    • If I toggle numlock on the USB keyboard, both the USB and Amiga floppy light sync up perfectly.
  • Some RPi distributions (including RetroPie) have a known issue with the Caps LED, which is just never lit. This will cause Keyrah V3 to malfunction, as the elaborate caps lock handling (which needs to accomodate for non-shifted keys and make sure that the caps LED on the Amiga keyboard is in sync with the computer's state) will fail.


    This is because Keyrah V3 must assume that the caps status that's being sent from the host computer is correct. If it's always-off, Keyrah will attempt to switch it on continuously, resulting in seemingly erratic behaviour.


    Please try with a clean Raspbian and verify if the caps LED on a normal keyboard works in all situations: CLI and desktop. Once that works with a regular keyboard, you can expect Keyrah V3 to also work as expected


    Note that locale settings are not necessarily affecting keyboard layout in Raspian or on RetroPie. There's a separate "keyboard setup" where you have lots of keyboard options. Haven't used that for a while myself, but you may find the Caps setting there.


    Jens

  • Hi,


    Thanks for the suggestion. I have done what you have suggested, but installed a fresh version of Ubuntu on my Pi.


    1. I unplugged the Keyrah device and only plugged in the USB keyboard. Caps Lock functionality on the USB keyboard (including LED) worked as expected.
    2. I then unplugged the USB keyboard and plugged in Keyrah. The keyboard Caps lock light (Amiga keyboard) works as expected, but I am still getting a mix of upper and lower case letters when typing.

    Sorry

  • If you plug in both keyboards, what does the caps LED of the USB keyboard show if you press the caps key on the Amiga keyboard, and what does it show if you press the "b" key (which appears to be the one that comes lower case although you have caps activated)?


    Jens

  • Hey Jens,


    If I have both keyboards plugged in at the same time the following happens


    Using the USB to turn on Caps, the Caps lock light does light on the usb keyboard, but NOT on the Amiga Keyboard. What comes next is very interesting. I turn Caps Lock On via the USB keyboard, I start typing on the USB keyboard any letter (not just b) and I get uppercase letters, then after a few keypresses the Caps Lock light goes out on the USB keyboard (without pressing the caps lock key) and the letters start in lowercase. It's almost as if the Amiga Keyboard is turning off Caps Lock part way through.

  • Using the USB to turn on Caps, the Caps lock light does light on the usb keyboard, but NOT on the Amiga Keyboard.

    This is expected. The Amiga caps LED is purely controlled by the keyboard itself, and that's the very reason for Keyrah V3 attempting to keep the two states in sync.

    It's almost as if the Amiga Keyboard is turning off Caps Lock part way through.

    That's exactly what it's doing, yes. It's described in the manual as well. Please note that the PDF manual (see Wiki) has a lot more info than the short manual that was in the box.


    ....and now I have a situation where both USB keyboard has caps lock LED on and so does the Amiga Keyboard, but if I type from either keyboard, I get lowercase letters!

    This may be a problem with the Linux settings - the keyboard only sends key strokes, and it's up to the computer to interpret them as upper or lower case. If the computer's state is "caps on" but it still gives lowercase letters, something in the OS has a hickup.


    Jens

  • Thanks for the feedback. Yes I can see from the more detailed manual.


    Ignoring the USB keyboard etc, i.e. only using Keyrah and the Amiga keyboard, if I use Caps Lock on, i get a mixture of upper and lower case letters. That can't be right can it?


    This is with two fresh installs of vanilla of Ubuntu and two fresh versions of DietPi

  • Please do the following:


    - open a console/shell

    - start "evtest"

    - Now you get a list of devices in the system. One of them is the Keyrah keyboard, enter its number to select it

    - it will now log the received keyboard events to the console.

    - Type some letters, then caps-lock, some letters again


    ... and paste the resulting log

  • Thanks Tobias,


    I have started evtest, I have 6 Keyrah input devices showing:


    /dev/input/event2: Individual Computers Keyrah V3

    /dev/input/event3: Individual Computers Keyrah V3

    /dev/input/event4: Individual Computers Keyrah V3

    /dev/input/event5: Individual Computers Keyrah V3

    /dev/input/event6: Individual Computers Keyrah V3

    /dev/input/event7: Individual Computers Keyrah V3


    does it matter which one I select?

  • Ok, figured it was event4 I needed. I have attached the logfile as requested. Just an observation, when pressing the Caps lock on, the events triggered go a little crazy! Not sure if this is by design. I had to compress to a zip format because those few seconds of logging generated a 2mb file.


    I know we have been back and forth a fair bit, but I really appreciate your efforts and support.


    Thanks


    Andy

  • Wow, thats crazy.... and not a single LED event in between - which is the problem. When you press caps-lock on Keyrah, then Keyrah waits for some milliseconds to receive the LED change, and then checks if the internal caps-lock state is the same as what the LED event indicated - and if not sends another caps-lock press to correct that. Since it never sees the LED change, it will start oscillating. I have to admit i never tested this case - as it should never happen and i wouldn't know how to reproduce it either :)


    Could you do the same with your usb keyboard, without Keyrah connected? (Didn't you say the LEDs _DO_ work?)


    The only thing i can imagine here is that it takes unusually long for the raspi to send the LED state.

  • Another thing you can try - use the "setleds" tool to switch the LEDs on/off - you'll have to use a "real" terminal (a graphical X11 terminal will not work):


    setleds +caps

    setleds -caps


    After some googling it seems... this could actually be a power problem. If there are any other things connected to the raspi, disconnect those for a test. Also, is the red LED on the raspi constantly on? Or blinking every now and then? (that indicates a power problem)

  • Hi Tobias,


    Sorry for the delay. I am working away at the moment and won't be able to test your suggestions until Sunday.


    I agree it is weird, and just to reiterate the Light on the caps lock key does work as expected. I will try the the USB Keyboard suggestion and the setleds suggestion and re-up the logs on Sunday. It's a pain having to wait to test sorry.


    I can confirm that the red LED is a sold on. I have had power issues before, so know what you mean with quirky behaviour. Power supply has been upgraded to 4amp as well, but it is 100% solid.


    The keyboard is actually an Amiga 500+ keyboard, I don't imagine that will make a difference, but just I mention it just in case.


    Again help and support and suggestions greatly appreciated.


    Andy

  • I thought that may be the case, just wanted to make sure all the facts were out there :-)


    So, just to confirm, when I return I am:


    • Plugging only the USB keyboard in (Keyrah disconnected) and logging activity in relation to caps lock
    • Plugging USB keyboard in with Keyrah connected and monitoring the Keyrah activity when changing caps lock state with the USB keyboard
    • Using setleds command and monitoring the states


    Have I got that right?