I have read the css code from the repo and modified my custom gtk.css file to properly apply to this keyboard, and it looks great.
The non-css code from the repo is confusing to me.
I don’t understand how to modify the positions of keys on the various layouts. Can this be done in a similar way to Sqeekboard, in which it is possible to modify a YAML file and place it in ~/.local/squeekboard/keyboards/ directory, or is there another way in which to modify the layouts for this phosh-osk-stub keyboard? I see that .json files are used for the layouts, but I don’t know how to apply my own custom layout.
I also wonder if modifying existing files is enough to be able to create the keyboard that I want to create (based on MessagEase), or if I will need to learn how to create code in non-css languages to accomplish this.
As the new year approaches, I know many people are busy with other things (like celebrating), but I want to ask again if anyone has any understanding of how to modify keyboard layouts for the phosh-osk-stub keyboard.
@guido.gunther, when you are less busy, would you please help me to understand some things about your amazing keyboard? I’m really showing my ignorance here, but I am completely lost on how to modify it at all (except for gtk color themes), and I would appreciate any help on the matter.
If anyone else has anything to share about this keyboard, please do.
Note that modifying layouts isn’t one of p-o-s goals at the moment so you’ll be way more happy with squeekboard in that regard. That said you can use G_RESOURCE_OVERLAY (which is a generic glib mechanism to overlay gresources) to overlay your own layouts without recompiling. I don’t have an example at hand but Avoiding notches · Phosh explains how to use G_RESOURCE_OVERLAY for notch information. It’s similar for the osk layout’s json file.
Not for this specific case - at least not yet. I also have not the time to dig into it any time soon (need to finish the other projects + higher priority non L5 projects).
I have been unsuccessful in trying to do this. Has anyone else tried this?
I also still do not understand where to begin the process of creating a swipe keyboard. I thought that my first step would be simply modifying the layout of this keyboard, but I can’t even do that. I also don’t know if single keys can contain multiple secondary characters or if the secondary characters can be repositioned.
Ideally, I would like to set each key to have secondary characters such that each one is triggered by a swipe in a specific direction, with respect to the main key that contains it. Since the phosh-osk-stub keyboard supports secondary characters and swiping (on the spacebar), I feel that it is a better base for modifications than the default Sqeekboard keyboard.
If anyone would like to help with any of this, please do; otherwise, I am at a standstill.
If you look for swipe you need to code (either by modifying p-o-s or starting your own thing).
Developing for Mobile Linux with Phosh - Part 0: Running nested · Phosh explains how to get a development set up on your Laptop/PC. Use that and treat phosh-osk-stub as the application you want to test, build it from source and run it in the nested session. Then look at how pos-osk-widget.c handles the gestures.
EDIT: you can use either squeekboard or p-o-s as a base as the gestures are supported by GTK which is used by both.
(I’m not following the forums atm so please excuse when not getting further replies).
Quick question - I tried this and it looks good but I don’t use a QWERTY layout. Is there a way of changing the layout to another standard or is that coming?
I am on byzantium. I added the repo, did the install of phosh-osk-stub, then did update-alternative. but I had to use sudo to change alternative. I am still seeing the squeekboard osk. Even after reboot.
There are three options after using the command, so input 2 when prompted, then restart thereafter:
sudo update-alternatives --config Phosh-OSK
There are 2 choices for the alternative Phosh-OSK (providing /usr/share/applications/sm.puri.OSK0.desktop).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/share/applications/sm.puri.Squeekboard.desktop 50 auto mode
1 /usr/share/applications/sm.puri.Squeekboard.desktop 50 manual mode
2 /usr/share/phosh-osk-stub/sm.puri.Phosh.OskStub.desktop 30 manual mode
No, you don’t need to remove that directory. The phosh-osk-stub keyboard doesn’t use the same configuration files as Squeekboard, so they don’t apply at all when switching.
Ok, I realized the problem. @FranklyFlawless I was thinking of the screenshot you showed for the alternatives config and automatically setting #2 as you mentioned.
I just tried it again, and realized the options are different now. This is what showed up on my phone:
There are 3 choices for the alternative Phosh-OSK (providing /usr/share/applications/sm.puri.OSK0.desktop).
Press to keep the current choice[*], or type selection number:
So, I had to select #3 now to use the Phosh-OSK Stub. Not sure if anyone else noticed this change, but the alternatives menu is different than what was posted previously.
I am getting the new keyboard now. Thanks for everyone’s help.