Fingerterm custom keyboard layout containing just the F-keys on a single row

Hello,

I am looking for a way to get access to the F1 - F12 keys for some interactive terminal applications (i.e. htop )

I don’t need any other keys in the soft keyboard than the F-keys, as I am using sailfish on Gemini pda, which has hardware keyboard with anything else.

Before coming to sailfish I was using the same device with android and termux. There a config file could make a custom softkeyboard of only one line of keys, with these particular keys.

I haven’t been able to find configurations options similar to this in fingerterm, but I do see that there is an option to switch keyboard layout, so I am hoping it may be possible :slight_smile:

cheers

Not sure about fingerterm but you should be able to edit layouts in Toeterm (/home/defaultuser/.config/ToeTerm/ and here .layout files)

1 Like

Ahoy @jbj,

The follow links might help you create and test a layout file with the keys you want:

https://doc.qt.io/qt-5/qt.html#Key-enum

From the second link you can see:

‘Qt::Key_F1’|‘0x01000030’
‘Qt::Key_F2’|‘0x01000031’
‘Qt::Key_F3’|‘0x01000032’
‘Qt::Key_F4’|‘0x01000033’
‘Qt::Key_F5’|‘0x01000034’
‘Qt::Key_F6’|‘0x01000035’
‘Qt::Key_F7’|‘0x01000036’
‘Qt::Key_F8’|‘0x01000037’
‘Qt::Key_F9’|‘0x01000038’
‘Qt::Key_F10’|‘0x01000039’
‘Qt::Key_F11’|‘0x0100003a’
‘Qt::Key_F12’|‘0x0100003b’

If you use this file:

as example, see the line 57:

["pgup", 0x1000016, "home", 0x1000010]

use it as example, it should work.

If you succeed let us know how :wink:

2 Likes

hi @throwaway69 and @nas
thank you both for the solutions!

I already found the F-keys for ToeTerm in the english extended keyboard layout, so that one is up and running already :slight_smile:

the F-keys fit perfectly in the bottom row, and if I add two extra keys, the clickable area aligns just right to match the matching F-key legend inside of htop (at least with my current font size)

maybe a little off topic, but do you either of you know if a soft key can send two simultanious keys?

I am thinking to put some useful buttons in the two extra soft keys I ligned up. (i.e. ctrl + b, for the default tmux command prefix)

cheers!

If I remember correctly you can’t do that (like press button A and send Ctrl+C).
Glad it worked for you! If you have any github/ gitlab upload your layout and share the link!

1 Like

Doesn’t seem to be possible from layout (modifier key codes are hardcoded and passing key value + modifier value doesn’t work as qt expects the modifiers separately it seems) you could probably add a custom button in keyboard.qml to call term.keyPress(event.key,event.modifiers); directly with the combo you need

1 Like