Customizing ubuntu phone: terminal top keyboard row

This is one of those “for my own reference on my next (pine) phone” posts, but anyone using ubuntu phone (ubports.com) may find it useful.

I use mutt (in a libertine ‘container’) on the ubuntu phone for sending email. The terminal keyboard is not bad, but one annoying thing I’ve found is that the auxilliary keyboard rows were not optimal for use in vi. The top row, for those who haven’t seen it, is a single row of extra buttons. There are several top rows to choose from, i.e. Fn keys, control keys, scroll keys, and there’s even one where buttons type out full commands like ‘clear’, ‘rm’ and ‘chmod’.

The main buttons I use are the up arrow, tab, and escape. But escape is in the ‘fn’ row, while tab and up arrow are in the scroll list. So I kept having to switch between different rows. To switch rows, you hold down a button until a popup appears allowing you to choose. This is suboptimal.

To fix this, I went into /opt/click.ubuntu.com/com.ubuntu.terminal/0.9.4/qml/KeyboardRows/Layouts and edited ScrollKeys.json. I removed the _key suffix for all the labels, which just take up space so that fewer buttons show up in one line. I copied the escape key entry from FunctionKeys.json as the first entry in ScrollKeys.json. Then I moved all other entries which preceded the tab key to the end of the file (adjusting the trailing ‘,’ as needed). Finally, I copied ScrollKeys.json to AScrollkeys.json, to make this the first keyboard row whenever I fire up the terminal. (The file ~/.config/ubuntu-terminal-app/ubuntu-terminal-app.conf supposedly orders these, but it is re-written every time the terminal starts!)

Perhaps I should add a row for ‘|’, ‘!’, and a few others which I’m always going to the second number screen for. But for now, this should speed things up.

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s