OSK Enhancements Proposals



  • Hello Everyone,

    I'm starting this thread because I wanted to share my ideas about improving the OSK in UT.
    Back in the Canonical days, I suggested to use the space key for controlling the text cursor.
    It was a real joy when I learned that Canonical did implemented it which we can now enjoy with UBports.
    And I want continue with that idea and improve or extend its functionality.

    At the moment, I have two prototypes.

    1. [Swipe to trigger cursor mover]
      Instead of the current "Press and Hold" gesture to trigger the cursor mover, I made it to work with just a horizontal swipe in the space key. For me, this gesture is more natural while typing unlike the current one which will some kind of disrupt your flow by long pressing before swiping. There's a catch though because there's more chance of accidental trigger especially for those who tend to drag fingers while typing. My experience so far is good though and did an accidental trigger just once.
      Demo Video

    2. [Swipe to switch OSK language]
      This one adds a functionality to change OSK language via swipe in the space key. Some people needs multiple OSK layout/language enabled and it could be a bit hassle to switch between them especially if you have more than 2...remember emoji? yeah that counts :) I personally don't have this problem so I can''t attest if this one would be really helpful. And also, at the moment, emoji kinda breaks it because it has a very different layout which doesn't have the space key. I'm also planning to propose a new layout for emoji :)
      Demo Video

    Now I don't have a concrete plan yet on how I will propose these. I'm thinking of adding a Gesture section in the settings app so users can customize the gestures and which functionality they want for them. For example, you can set "PressAndHold" for Cursor Mover then "Horizontal Swipe" for Language switch. But that could be too much settings? can't say yet.

    EXPAND IT FURTHER!
    Currently, I have another idea to expand this idea further and I'm trying to do a quick hack for it.
    The idea is to also use the "cursor mover" feature for text selections/manipulations. My initial thought is to use double click/tap (without releasing) to start the text selection. I would also like to put Copy, paste, select all buttons above the OSK. I want to see and use it first in action before thinking of the best way to implement these gestures. Unfortunately, I can't even do the first step yet which is to enable text selection from the OSK and it seems like I have to modify the C++ part of maliit and recompile which I am not familiar enough.

    Any thoughts, opinion, violent reaction, help maybe?

    FUN FACT: When I got the idea of the "Space key cursor mover", it was a "Eureka" moment for me and I thought I was the first one in the world to come up with that idea. Then days after that, I saw the exact same functionality on my friend's LG G3. At least it was my original idea and it just happened someone got it first LOL



  • @kugiigi Thanks for that post. I, as a long years user of Canonical UT, and since a few weeks of UBports, was not aware of this cursor mover.



  • @kugiigi said in OSK Enhancements Proposals:

    The idea is to also use the "cursor mover" feature for text selections/manipulations.

    Yes please!



  • @doniks Then help me recompile maliit LOL



  • @kugiigi

    But that could be too much settings?

    If you think, that there will be too much settings for an non-advanced user, you can always make it to get OSK settings upgrade from some file, to let more advanced user decide... you know, like, if file ~/.config/osk/setings.json exists, update default config from it.



  • I vote for including in Settings the choice of selecting different options for the space bar hidden function since....I like ALL the implementations and workarounds actual and future you invented Kugi :) I'm testing the gesture listed at the point 1 and I find it very useful. Good job indeed and keep going on!



  • @kugiigi said in OSK Enhancements Proposals:

    @doniks Then help me recompile maliit LOL

    not promising that I know how, but happy to think along. where are you at?



  • @doniks successfully compiled via crossbuild but I'm trying to figure out which files only to copy to my device
    I don't want install everything cause it might break my OSK and I won't be able to bring it back to working :)



  • @kugiigi said in OSK Enhancements Proposals:

    @doniks successfully compiled via crossbuild

    mind pasting some more concrete steps?

    but I'm trying to figure out which files only to copy to my device
    I don't want install everything cause it might break my OSK and I won't be able to bring it back to working :)

    shouldnt it build a deb? then youd getv exactly what you need to install



  • @doniks I cloned the repo locally and compiled via crossbuilder. Crossbuilder is quite easy to use although I had some errors deploying yo my device.

    At first, I didn't installed the debs and just picked some files (i.e. *.so) from them and installed manually to my device however that didn't work so reverted back the original files.

    Last night, I tried deploying to my other UT install on Nexus 5, however it broke my OSK LOL
    And now I don't know how revert it back.
    Then I noticed on my main UT install where I manually installed files, that whenever I switch layout, the OSK restarts.

    I think it's safe to say that I messed up the compilation LOL



  • @kugiigi said in OSK Enhancements Proposals:

    @doniks I cloned the repo locally and compiled via crossbuilder.

    I'm trying. I'm stuck at this:

    ubuntu-keyboard_1.100+17.04.20170320-0ubuntu1local~1540929546_armhf.deb
    Upgrading packages already installed on device with newly built ones.
    adb: error: remote object '/tmp/repo/create_repository.sh' does not exist
    [100%] /tmp/repo/create_repository.sh
    + where=/tmp/repo
    + origin=local
    + label=repo
    + cd /tmp/repo
    + apt-ftparchive sources .
    + gzip -9
    + tee /tmp/repo/Sources
    + apt-ftparchive packages /tmp/repo
    + gzip -9
    + sed s@/tmp/repo@@
    + tee /tmp/repo/Packages
    + apt-ftparchive -oAPT::FTPArchive::Release::Origin=local -oAPT::FTPArchive::Release::Label=repo -oAPT::FTPArchive::Release::Codename=/tmp/repo release /tmp/repo
    Package: *
    Pin: release o=local
    Pin-Priority: 2000
    
    Package: *
    Pin: release a=xenial*
    Pin-Priority: 50sed: can't read /etc/apt/preferences.d/extra-ppas.pref: No such file or directory
    Get:1 file:/tmp/repo  InRelease
    Ign:1 file:/tmp/repo  InRelease
    Get:2 file:/tmp/repo  Release [2,004 B]
    Get:2 file:/tmp/repo  Release [2,004 B]
    Get:3 file:/tmp/repo  Release.gpg
    Ign:3 file:/tmp/repo  Release.gpg
    Get:4 file:/tmp/repo  Packages [10.3 kB]
    Reading package lists... Done  
    W: The repository 'file:/tmp/repo  Release' is not signed.
    N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     repowerd : Depends: repowerd-data (= 2018.03+1ubports1+0~20181026092453.6~1.gbpae2cfa) but 2018.03+1ubports1+0~20180417175046.5~1.gbp3909fb is installed
    E: Unmet dependencies. Try using -f.
    sed: can't read /etc/apt/preferences.d/extra-ppas.pref: No such file or directory
    If a script named .crossbuilder/post_deploy existed, it would be executed on device after every deploy.
    

Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.