F-keys on a BT keyboard

I’m used to use my L5 with a BT keyboard (normal ASCII QWERTY) and found even a way, a mapping, with the terminal rxvt-unicode to be able to type Spanish tilded chars, like á é í ó ñ ¿ ¡ … How this works is documented here BT keyboard config for Spanish tilded chars like á í ó ñ in kgx app - #2 by guru also a picture of the keyboard to understand the following question:

The keyboard has a blue Fn key and on the keys of the digits 1…9… there are blue symbols as F1, F2, … F9 … which I understand as using the key Fn + 1 it gives function key F1, etc.
That seems to work as expected but the funtion key is catched/read by phosh and not delivered to the app like kgx or rxvt-unicode.

Any idea of this?

1 Like

I cloned the sources of phosh from World / Phosh / phosh · GitLab and looked around… But, I’ve no clue about why the function keys fro the BT keyboard do not get delivered to the application with the focus, and are catched by the phone shell. Please, @guido.gunther , could you give me some pointer and enlighten me a bit. Thanks

2 Likes

I have no such issues - at least tested with Firefox. Phosh just catches F11 to hide the top and bottom bar, but Firefox itself also hides its bars as expected. Same with F3 (search bar like Ctrl + F), it just works.

1 Like

In my L5:
F10 - pops up an audio slider and hitting F10 again, lowers each time audio
F11 - pops up an audio slider and hitting F11 again, ups the audio each time
F7, F8, F9 - pops up this audio slider with a symbol which seems to forbit todo anything with the slider (on the left end of the slider is a circle with a backslash)
F1 - gives Ctrl-A to firefox (selects all)
F5 - is page up in FF
F2, F3, F4 and F6 have no visible effect.

I.e. there must be somewhere a configuration which F-keys are catched by phosh and which delivered to the app (the latter I could configure inside the app).

1 Like

Sounds more like your keyboard does not send function keys to your phone, but media-keys etc. I say this especially since F11 does not hide Phoshs top and bottom bar as expected. I’m 100% sure Guido and Co would never ever rebind F11 to something else than Phosh-fullscreen mode.

1 Like

All this seems to be more complex (and a moving target). Now F3 works as sliding from the above device area (down and up) and F5 works as sliding from the bottom up and down. I’m attaching here also the one page documentation explaining the essentials. Maybe this gives us some clue.

1 Like

If I see it correctly, Fn + Shift + 1 = F1. Please try this and tell me if it does the job of F-keys. Look at the table in the bottom right. It explains what I said before. Your keyboard was sending media keys to your phone (like volume up and down). It seems you just used the wrong combination.

1 Like

The BT keyboard can be switched to mode ‘Android’ or ‘Windows’ or ‘iOs’ with Fn+A or Fn+Sor Fn+D see layout.

Only in mode ‘iOs’ the combination of Fn + Shift + n (n from 1 to 9 …) gives something which look like code for F keys. I run:

od -t x1 > ios-shift-fkeys.txt
(pressed F1 .... F12 always followed by ENTER and here is the result in hex)

cat ios-shift-fkeys.txt
0000000 1b 4f 50 0a 1b 4f 51 0a 1b 4f 52 0a 1b 4f 53 0a
0000020 1b 5b 31 35 7e 0a 1b 5b 31 37 7e 0a 1b 5b 31 38
0000040 7e 0a 1b 5b 31 39 7e 0a 1b 5b 32 30 7e 0a 1b 5b
0000060 32 31 7e 0a 1b 5b 32 33 7e 0a 1b 5b 32 34 7e 0a
0000100
1 Like

The documentation is pretty clear and also explains why

happened. Give a look into this table (especially the first row):

Unbenannt

F10 and F11 does what documentation says for F11 and F12 (after looking at your keyboard photo it seems like an outdated documentation). F7-F9 could happen, because there was no music player playing anything. F1 is as you described. F2-F4 do nothing without marked text or other stuff to copy paste.

At least it’s all pretty close to your description and makes much more sense than “it is a Phosh issue”. I can tell you, F-keys are working as expected with on screen keyboard, keyboard connected via USB or Bluetooth. I could test all the 3 methods without finding any problem. So, it has to be an issue of you (using the keyboard in the wrong way) or your keyboard (doing things different to documented stuff).

Your keyboard should be used in Windows mode and not in Android or iOS mode. Windows and Linux are more close since both are designed for desktop usage and Linux systems usually have to use Windows keyboards. And F-keys seems to be only supported in Windows mode (if documentation is true). Even if Android and iOS support F-keys, if the firmware of your keyboard does only support them in Windows mode, it will never send those in other modes.

2 Likes

@Ick , first of all thank you very much for following and your hints. Above perhaps you mean the “first column”.

I did today a thoroughly testing.

I used the OSK and the terminal app and collected into a file the keys F1 to F12, always followed by ENTER. The hex values are:

purism@pureos:~$ cat osk-fkeys.txt
0000000 1b 4f 50 0a 1b 4f 51 0a 1b 4f 52 0a 1b 4f 53 0a
0000020 1b 5b 31 35 7e 0a 1b 5b 31 37 7e 0a 1b 5b 31 38
0000040 7e 0a 1b 5b 31 39 7e 0a 1b 5b 32 30 7e 0a 1b 5b
0000060 32 31 7e 0a 1b 5b 32 33 7e 0a 1b 5b 32 34 7e 0a
0000100

Only when I switch the BT keyboard into iOS mode (with FN + D) then it produces for Fn + Shift + 1 the hex output 1b 4f 50 (and so on with the other numbers).

The produced full hex output with the procedure of exercise #1 is

purism@pureos:~$ cat ios-shift-fkeys.txt
0000000 1b 4f 50 0a 1b 4f 51 0a 1b 4f 52 0a 1b 4f 53 0a
0000020 1b 5b 31 35 7e 0a 1b 5b 31 37 7e 0a 1b 5b 31 38
0000040 7e 0a 1b 5b 31 39 7e 0a 1b 5b 32 30 7e 0a 1b 5b
0000060 32 31 7e 0a 1b 5b 32 33 7e 0a 1b 5b 32 34 7e 0a
0000100

and the two files are identically

purism@pureos:~$ diff ios-shift-fkeys.txt osk-fkeys.txt
purism@pureos:~$

I know, this does not match the attached documentation, but it works and gives me what I wanted.

Thanks again.

2 Likes

My bad, you’re right.

Seems so, but now it works and that’s all that matters. You’re welcome.

1 Like

I’m willing to contact Tech Gear support, but can’t detect any mail addr or web site.

1 Like