OS Keyboard Affected By Display Scale/Draw Offset (Linux)

Hello! I'm new to developing for the Playdate, and wondering if there's anything that can be done to get the keyboard to display as it normally would when using a smaller scale for the display (2 in my particular case) and using offsets to follow a sprite around. Given how little I can modify what the keyboard does, it seems it would be similar to the OS pause menu and ignore these settings. Am I just totally insane here?
Note that I'm working with the simulator on Linux.
Thanks for your time!

The keyboard isn't actually a part of the OS. It's a helper for more convenient text entry, but there's nothing saying you have to use it as-is.

If you want to mess with the keyboard, its source code is in the SDK installation directory, at $PLAYDATE_SDK_PATH/CoreLibs/keyboard.lua. Copy that file to your project, then import that instead of the CoreLibs one.

You can then easily modify the keyboard to use a different font/position/whatever in order to make it work with the scale.

The display scale is built into the rendering backend. Naturally, the keyboard's source doesn't take scale into account -- it can't bypass the display scale, since that applies to the entire framebuffer.

Hi Remagamer!

You are correct, the keyboard does not work with scales other than 1x. We should mention that in the docs. I don't think it's likely we'll add support for other scales in the near future.

I do think it should work correctly when the drawOffset has been set to something other than 0, 0 though, so that seems like a bug to me.

I'll get both of these issues filed in our system. Thanks for the feedback!

1 Like