Call playdate.keyboard.show from C or alternative?

,

Hey! :wave:

In the API-Ref for Lua playdate.keyboard.show() method. But not for C.

I there any available way to show builtin keyboard from C without initialisation of Lua-engine?

1 Like

The keyboard is not actually built-in, it's implemented in CoreLibs/keyboard.lua. So, nope. Lua is required for that. Sorry!

1 Like

I’ll just ported lua version to c. :wink:

1 Like

Any luck on that C port? :smiley:

Yup. CrankedTicker with assets easily implemented in Rust. But without roll now. I just did what I need now. Later I’ll refactor animation system and probably impl full keyboard with rolls, then open it.

3 Likes

I just finished a working version in C of the Keyboard Api (thank you @dave for the acceleratedChange formula).

keyboard-demo

However I would like to know if it is OK to post the code here. The license explicitly forbid to create derivative work of the API without a written permission:

PLAYDATE SDK LICENSE 1.0

[...]
You will not:

  • Modify, adapt, alter, translate, or incorporate into or with other software or create a derivative work of any part of the SDK, except as permitted herein, without express written permission from Panic;
7 Likes

Was there a decision here?

Can @Daeke 's keyboard code be posted?

@dave said thanks via private message for the code, but I still don't know if I can post it here.

Hey there! Sorry about the late reply—as things stand now, we are perfectly happy with you releasing this code! :+1:

6 Likes

@Daeke did you end up releasing this?

I would be interested

I just released it here: some-corelibs-port/keyboard at main · Raphcal/some-corelibs-port · GitHub

In the current version, you have to create keyboard instances but it may be easier if I create a singleton.

3 Likes

That looks really solid, thank you!

1 Like