Skip to content

Spaces don't work in baremetal builds on pi4 #2773

@TheShed412

Description

@TheShed412

Reproduction

  1. Build for Raspberry Pi 4
  2. Load image on to Pi
  3. Plug USB keyboard in
  4. Power on Pi
  5. Once terminal loads, hit space bar. No spaces are added to the terminal
  6. Hold ALT+Space. Spaces are added

Potential Fix

I was playing around with this, and it seems to be an issue with the Symbols array in the studio.c file.

When the space key comes through from I'm guessing circle, the value isn't the space in the symbol string:

" abcdefghijklmnopqrstuvwxyz0123456789-=[]\\;'`,./ "

I believe it is probably getting a null terminator at the end instead of the last space. I was able to fix this by adding an extra space to that string. Since SDL builds skip that part of the keyboard function, all SDL builds will work (I tried on linux and it does).

Looking at the effected code, it seems like this has been an issue for awhile? Not sure if anyone else noticed it, or if maybe there was a recent update to Circle that wasn't checked fully? But if this fix can work, I can make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions