Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advice on subclassing KeyboardKey? #128

Open
otbox21 opened this issue Oct 26, 2018 · 0 comments
Open

Advice on subclassing KeyboardKey? #128

otbox21 opened this issue Oct 26, 2018 · 0 comments

Comments

@otbox21
Copy link

otbox21 commented Oct 26, 2018

I'm making a keyboard with another view that will have some snippets. I'm starting with just 8, like this:

screen shot 2018-10-26 at 12 54 30 pm

I'd like to have these buttons behave like the normal keyboard keys do, with their wonderful pop-up behavior and their proper resizing across devices and all that. So, I figure I should make a subclass, like class SnippetKey: KeyboardKey

There's coding wizardry on this keyboard the likes of which are a bit beyond me, so I learn by changing things here and there, guessing, and then actually seeing what it does. So, I went into DefaultKeyboard, and changed the QWERTY row to just three keys, hoping that they'd magically display like my above picture. They did this:

screen shot 2018-10-26 at 1 02 41 pm

Any advice would be very much appreciated. Until then, I'll be poking and prodding the code. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant