My squeekboard terminal layout. It was easy

UPDATE Jun 18: source link and comparison image with the last changes.

Since I’m using the command line frequently, I wanted to add some useful keys (Tab, ‘-’, ‘.’ ,’/’) to the base/main view of the terminal layout. As that was easy, I ended up with a lot of other changes in all the views. This applies to the English (United States) terminal layout from Squeekboard version 1.14.0 (I haven’t tested others). This post describes the results.

Here are a few things that explains my choices:

  • I’m not familiar with Android or IOS keyboards. The PinePhone is my first and only smartphone (I have a L5 pre-order on sale).
  • I’m a vim user (and with :inoremap jk <Esc> – when I type jk I get an Esc)
  • I prefer to use ‘for terminal’ applications, like: vim, cmus, mutt, mc, feh, mpv, w3m, …
  • I’ve moved important keys from the lower corners (harder to access there)

Other things worth mentioning to avoid confusion:

  • ‘>_’ was relabeled to ‘Fx’ – it’s the button to display the Fxunctions keys/actions view
  • main view lacks a preferences button (replaced by the symbols button - more useful). However it’s available from other views.
  • The Shift key I introduced into the action view (Fx) doesn’t do anything yet (no effect on the other keys there).
  • Ctrl, Alt are still sticky. I think that requires code changes. Later, I’ll probably look into it. That stickness is bad for my needs.
  • I’ve only changed the terminal layout and only for the portrait mode. More, for later, I guess.

This layout allows me to be significantly more efficient in my typing. With time, I’ll probably add more changes especially to the symbols view which I lightly changed so far.

Installation:

  • Only one file is needed, a text file called us.yaml. It’s available for 1 year here:
    https://textuploader.com/tsbxy

  • Copy the us.yaml file into the directory below that you can create with:

$ mkdir -p ~/.local/share/squeekboard/keyboards/terminal/

  • To activate it, using the squeekboard, press the preferences button (left low corner) and choose a different option there to trigger a reload.

Remove/rename the us.yaml to get back the original layout (after you trigger again the squeekboard for reload).

And here is a visual Before-After comparision of the changes:


Thanks to all the contributors and maintainers! @dcz

14 Likes

Nice! I’ve noticed that the builtin terminal layout could use some changes in the placement of frequent shell symbols. I don’t use that layout a lot, so perhaps other people would know which changes would be the best for general use (not necessarily hardcore vim :D).

Also, improving the tutorial/documentation is always welcome.

2 Likes

Great work.

I worked on an own layout, too. I tried to put even more buttons on the main view, e.g. the cursor keys, to minimize view switching. Hence the keys get smaller and smaller. I already use a keyboard with many small keys on my android so I am used to it. From time to time, when I am tired or so I repeat the same typo 10 to 30 times in a row lol, but most of the time I’m fine with it. I rarely have use additional layers. For some people the keys might be to small and they would prefer a different trade off.

I even tried to unfold the keyboard with additional buttons to the upper instead of switching views. Unfortunately the result was that the whole keyboard scaled down on both axis and didn’t scale back. Also the layout is lost after reflashing the PP. When I’ll have do it again I’LLC give it to the community.

1 Like

I would not remove arrows from the first screen. They are so useful. After being tortured by android+mac keyboards trying to place the cursor correctly for a correction the arrows are too important to be removed.

If one needs to add keys, then maybe a second line of thin keys can be added and make the last row (the one with the space) also thin in order to save space. Why the space or the alt keys need to have so much real estate on the terminal screen?

1 Like

A compromised has to be made. Usually, terminal programs have alternatives to the arrows keys in the style of emacs key-bindings (Ctrl-F, Ctrl-B, Ctrl-P, Ctrl-N) or vi key-bindings (h, j, k, l). When I need to press more then one or two arrows, I’ll just switch to the actions view (Fx) where I have a nice layout of arrows.

If you’ll go that way then you’ll make more mistakes while typing which in turn increases the use of the arrow keys and key strokes in general. Not good.

The space key is very used also in browsing some text (page after page – as a Page Down key) or a collection of elements (like pictures), or pause a video or music (EDIT: media playback benefits a lot from a touchscreen, so not really good examples). In most of these cases your eyes are concentrating on the content not on the keyboard. You just hit that region on the keyboard where you expect a big space key to be.

I also thought of porting Neo2 layout to squeekboard. And even if it might be useful I thought a step further. Layouts like Neo2 are optimized for typing with multiple fingers on a HW keyboard. But on a virtual keyboard we usually type with one finger only, because there is no haptic feedback, so little space, more fingers will hide bigger parts of the virtual keyboard and you have to hold the device in hand most often.

So I did a quick web search on optimized virtual keyboard layouts and of course there some work been done. I didn’t went into it, but could be worth to do so. Even if a user has to get used to a completely new layout in might be more efficient in the long run.

Moving your pre-order to batch Fir might be your second (optional) preference? Perhaps better choice of yours (something to be considered at least).

P.S. I’m actually not expecting to get your reply here, just rethink if there exists any justified reason to loose your place in a queue? Eather for L5v1 or for L5v2 Linux smartphone. Partly unpolite proposal from my side, but don’t take it wrongly, please.

Only today I’ve realized that if you use this layout with Chatty, the BackSpace is awfully closed to the Send button from Chatty. Awful situations can occur if someone accidentally presses Send instead of the BackSpace.

To avoid that, I’ve changed the layout by switching the positions of the Backspace with ‘-’ (or Insert in the other views). Now, those kind of accidents are much harder to happen, and the BackSpace being the 5th button on the first row is easier to press in that position. So I’m pretty happy with the result.

For now, I only did the change locally (you can do those too!). I intend to put this layout into a forked repository soon, preferably on Purism’s GitLab where I tried to create an account on Friday, but after three working days it is still pending approval… My textuploader link above expires this Friday, so… we’ll see.

1 Like

Well, that’s dissapointing. After a full week since I’ve created the account on Purism’ GitLab instance, it is still pending approval! It would had been understandable if they had denied access – you know, “our toys” or “we don’t like you” – but now, after so long time, I’m interpreting their inaction as either “we don’t care” attitude or incompetence (“we forgot about that gitlab”), which both are worse enough for me to change my mind and stop any plans of contributing further and to start moving away from their Phosh software (I’m not a fan of Phosh, TBH).

So I have updated for the last time my first post here, to include the latest changes I made to the layout.

EDIT while writing this comment: Just check again before publishing it. Now it’s says “Invalid login and password”. Since the clock time looks to be the same as when I register the account, I guess that the “pending approval” requests expires automatically after 1 week. What I said above remains valid.

I pinged the relevant person and it seems they thought your request was spam. You should have access now.

3 Likes

Spam? That’s hard to believe that someone can consider my personal data as such. I have provided my real name which contains Romanian characters, I provided my real personal email address which has a Romanian domain name and matches partially my name, and I chose eugenr as gitlab username. I used my email address and my name for a L5 pre-order on Purism shop and a Fund My App donation, and my email and username is also used on this forum. I have used a residential Romanian IP (so not behind a VPN).

Even if they thought my request was spam, they should have denied access immediately, just in case they thought wrong.

I’m so dissapointed because nothing really good came from my attempts to buy or use Purism products and services. Time to stop. I recommend to everybody to go over to PINE64 and support them. They are wonderful!

I am not one who moderates the GitLab instance, but I’ve seen accounts here on the forum, and believe me, Romanian characters are standard in generated names. I’m having a hard time distinguishing those accounts, and with a single human between a hundred bots, I’m not surprised that it’s easy to ignore without checking the email.

I agree it’s unfortunate, and that’s why I forward complaints from the forums whenever I see them.

1 Like

I’m not sure what you see or don’t (about just partially looking at things and not as a whole), but just for the record, here on this Squeekboard thread of yours: @dcz might be considered as another wonderful person as well! And, besides she being author of Squeekboard (as I understand this), is there any good reason on why would you loose her trust in you, as someone that requested some helping hand (some things you cannot buy anyway)? Do you think that people will always find some extra time for you, your probably partial convictions only (see link below), and kindly reply to your requests?

For example this one comes from @amosbatto: “Purism has worked hard to get its code changes upstreamed into parent projects such as the Linux kernel, wlroots, GTK, and GNOME applications, so that Phosh can easily be adopted by desktop distros in the future with minimal effort, unlike the other mobile DE’s.@eugenr, as invited to contribute, just accept that you are having good will to work for broader Linux environment, within it, that’s all (don’t give up right away).

Another note (if helps to understand): just by replacing Č (&#268;) character into German language you’ll need to type four other characters Tsch, etc. Same applies for Romanian language characters.

I can understand your disappointment.

It seems as if Purism should change the process so that users who have already passed muster on the forum (i.e. are seen not to be spammers, are seen to be responsible contributors) should be able to request the GitLab account directly via the forum, bypassing whatever has gone wrong here.

Even with automated spam filtering (at both mail service provider and mail client level), we still all receive spam where we ourselves have to be the spam filter - and like any spam filter, there are false positives, unfortunately.

your code is not available anymore, when clicking the link i get:
“Service Unavailable”

Your layout looks fantastic, any chance to get the .yaml file?

1 Like
---
outlines:
    default: { width: 35.33, height: 46 }
    action:  { width: 50,    height: 46 }
    altline: { width: 52.67, height: 46 }
    wide: { width: 59, height: 46 }
    spaceline: { width: 140, height: 46 }
    special: { width: 44, height: 46 }
    small: { width: 59, height: 25 }

views:
    base:
        - "show_actions_small Ctrl tab_small Alt smallBS small-"
        - "q w e r t y u i o p"
        - "a s d f g h j k l"
        - " z x c v b n m / Return"
        - "show_symbols show_numbers      space Shift_L        period"
    upper:
        - "show_actions_small Ctrl tab_small Alt smallBS small_"
        - "Q W E R T Y U I O P"
        - "A S D F G H J K L"
        - " Z X C V B N M ? Return"
        - "preferences show_numbers      space Shift_L        greater_than"
    numbers:
        - "show_actions_small Ctrl tab_small Alt smallBS small-"
        - "~ @ # = 1 2 3 * ' \""
        - "` ! % $ 4 5 6 + ( )"
        - "\\ | colon & 7 8 9 0 Return"
        - "show_symbols show_letters         space        comma period"
    symbols:
        - "Ctrl ↑ ↓ ← smallBS →"
        - "~ ` | · √ π τ { } ¶"
        - "© ® £ € ¥ ^ ° [ ] @"
        - "show_numbers_from_symbols   \\ % ÷ × = < >  Return"
        - "preferences show_letters space        semicolon period"
    actions:
        - "menu_small Ctrl tab_small Alt smallBS Insert"
        - "Esc F1  F2  F3 Break  Up  Del"
        - "Pause F4  F5  F6  Left Down Right"
        - "F7 F8 F9 F10 PgUp Home Return"
        - "preferences show_letters F11 F12 PgDn End Shift_Fun"
    shiftable_actions:
        - "menu_small Ctrl tab_small Alt smallBS Insert"
        - "Esc F1  F2  F3 Break  Up  Del"
        - "Pause F4  F5  F6  Left Down Right"
        - "F7 F8 F9 F10 PgUp Home Return"
        - "preferences show_letters F11 F12 PgDn End Shift_Fun"

buttons:
    Shift_L:
        action:
            locking:
                lock_view: "upper"
                unlock_view: "base"
        outline: "altline"
        icon: "key-shift"
    Shift_Fun:
        action:
            locking:
                lock_view: "shiftable_actions"
                unlock_view: "actions"
        outline: "altline"
        icon: "key-shift"
    smallBS:
        outline: "small"
        icon: "edit-clear-symbolic"
        action: erase
    BackSpace:
        outline: "altline"
        icon: "edit-clear-symbolic"
        action: erase
    preferences:
        action: "show_prefs"
        outline: "special"
        icon: "keyboard-mode-symbolic"
    show_numbers:
        action:
            set_view: "numbers"
        outline: "wide"
        label: "123"
    show_numbers_from_symbols:
        action:
            set_view: "numbers"
        outline: "altline"
        label: "123"
    show_letters:
        action:
            set_view: "base"
        outline: "wide"
        label: "ABC"
    show_symbols:
        action:
            set_view: "symbols"
        outline: "altline"
        label: "τ=\\"
    show_actions_small:
        action:
            set_view: "actions"
        outline: "small"
        label: "Fx"
    show_actions:
        action:
            set_view: "actions"
        outline: "altline"
        label: ">_"
    period:
        outline: "altline"
        text: "."
    greater_than:
        outline: "altline"
        text: ">"
    comma:
        outline: "altline"
        text: ","
    j:
        outline: "altline"
        text: "j"
    k:
        outline: "altline"
        text: "k"
    J:
        outline: "altline"
        text: "J"
    K:
        outline: "altline"
        text: "K"
    space:
        outline: "spaceline"
        text: " "
    Return:
        outline: "wide"
        icon: "key-enter"
        keysym: "Return"
    colon:
        text: ":"
    semicolon:
        outline: "altline"
        text: ";"
    F1:
        outline: "action"
        keysym: "F1"
    F2:
        outline: "action"
        keysym: "F2"
    F3:
        outline: "action"
        keysym: "F3"
    F4:
        outline: "action"
        keysym: "F4"
    F5:
        outline: "action"
        keysym: "F5"
    F6:
        outline: "action"
        keysym: "F6"
    F7:
        outline: "action"
        keysym: "F7"
    F8:
        outline: "action"
        keysym: "F8"
    F9:
        outline: "action"
        keysym: "F9"
    F10:
        outline: "action"
        keysym: "F10"
    F11:
        outline: "action"
        keysym: "F11"
    F12:
        outline: "action"
        keysym: "F12"
    Esc:
        outline: "action"
        keysym: "Escape"
    tab_small:
        outline: "small"
        label: "Tab"
        keysym: "Tab"
    Tab:
        outline: "action"
        keysym: "Tab"
    Del:
        outline: "action"
        keysym: "Delete"
    Insert:
        outline: "small"
        keysym: "Insert"
    menu_small:
        outline: "small"
        label: "Menu"
        keysym: "Menu"
    Pause:
        outline: "action"
        label: "Pau"
        keysym: "Pause"
    Break:
        outline: "action"
        label: "Brk"
        keysym: "Break"
    Home:
        outline: "action"
        label: "Hm"
        keysym: "Home"
    End:
        outline: "action"
        keysym: "End"
    PgUp:
        outline: "action"
        label: "Pg↑"
        keysym: "Page_Up"
    PgDn:
        outline: "action"
        label: "Pg↓"
        keysym: "Page_Down"
    small-:
        outline: "small"
        text: "-"
    small_:
        outline: "small"
        text: "_"
    small.:
        outline: "small"
        text: "."
    small/:
        outline: "small"
        text: "/"
    "↑":
        outline: "small"
        keysym: "Up"
    "↓":
        outline: "small"
        keysym: "Down"
    "←":
        outline: "small"
        keysym: "Left"
    "→":
        outline: "small"
        keysym: "Right"
    Up:
        label: "↑"
        outline: "action"
        keysym: "Up"
    Left:
        label: "←"
        outline: "action"
        keysym: "Left"
    Down:
        label: "↓"
        outline: "action"
        keysym: "Down"
    Right:
        label: "→"
        outline: "action"
        keysym: "Right"
    Ctrl:
        modifier: "Control"
        outline: "small"
        label: "Ctrl"
    Alt:
        modifier: "Alt"
        outline: "small"
        label: "Alt"
3 Likes

All thanks to the Wayback Machine.

3 Likes

thanks!!
meanwhile i created also a version with tab on topleft:
US Keyboard, TAB on topleft

:sweat_smile:

2 Likes

Character popovers are used on phosh-osk-stub.

1 Like