Update the PinePhone keyboard driver to support missing characters?
#1
The goal is to run LibreOffice in Posh on the PinePhone. It can be run by typing:

OOO_FORCE_DESKTOP=gnome-wayland libreoffice

into to terminal. The GUI cannot be started, the LibreOffice installation prevents the start.

I have the PinePhone keyboard connected to the PinePhone, which works also for the terminal. I tried to type:

OOO_FORCE_DESKTOP=gnome-wayland libreoffice

Unfortunately, I cannot print a «_» with the PinePhone keyboard. The characters are on the PinePhone keyboard, but neither control, Fn, Alt, AltG nor the special Pine key works to get the characters to be printed in the terminal.

How can I modify the PinePhone keyboard driver to support the missing characters?
  Reply
#2
(05-31-2022, 02:35 AM)Peter Gamma Wrote: The goal is to run LibreOffice in Posh on the PinePhone. It can be run by typing:

OOO_FORCE_DESKTOP=gnome-wayland libreoffice

into to terminal. The GUI cannot be started, the LibreOffice installation prevents the start.

I have the PinePhone keyboard connected to the PinePhone, which works also for the terminal. I tried to type:

OOO_FORCE_DESKTOP=gnome-wayland libreoffice

Unfortunately, I cannot print a «_» with the PinePhone keyboard. The characters are on the PinePhone keyboard, but neither control, Fn, Alt, AltG nor the special Pine key works to get the characters to be printed in the terminal.

How can I modify the PinePhone keyboard driver to support the missing characters?

Look at threads in your OS specific forum regarding the keyboard userland driver. Many have step by step instructions
  Reply
#3
@Peter

  Below is what I did when after the latest updates and OS upgrades I lost (completely in Mobian and partially in PostmarketOS) the PPKC functionality.  The kb151 kernel module is not present anymore in either OS after all the above.  It will get some top row functionality back.
  These are the fixes for PostmarketOS.  I used this wiki page for inspiration:  https://wiki.mobian-project.org/doku.php...ccessories


Step 1
======
I changed the "kb151" to in "/sys/bus/i2c/drivers/kb151/2-0015" to "pinephone-keyboard" as below
/sys/bus/i2c/drivers/pinephone-keyboard/2-0015

In my home dir I created the "bin" subdir and in it I put the "kbd-external.sh" script.  Make sure it's executable.
Code:
mkdir bin
<vim, nano, your_editor> bin/kbd-external.sh
chmod +x bin/kbd-external.sh

kbd-external.sh

Code:
#!/usr/bin/env bash
# a11y is "a one one y" aka a-eleven-y aka accessibility
# Turns off onscreen keyboard when PPKC is present
# Disable vibration

if [ -L "/sys/bus/i2c/drivers/pinephone-keyboard/2-0015" ]; then
  gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
else
  gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
fi
# return status
echo "org.gnome.desktop.a11y.applications screen-keyboard-enabled is:"
gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled
# disable vibration on mouse and key presses
gsettings set org.sigxcpu.feedback profile silent
echo "org.sigxcpu.feedback profile is:"
gsettings get org.sigxcpu.feedback profile

Step 2
======
Then, add this to “~/.config/autostart/kbd-external.desktop”

kbd-external.desktop

Code:
[Desktop Entry]
Name=Keyboard
Type=Application
Icon=object-rotate-left-symbolic
Exec=/home/user/bin/kbd-external.sh
Categories=Utility;
NoDisplay=true


Step 3
======
In my case this was already the case but if it isn't, make sure that XKB_DEFAULT_MODEL env variable is ppkb
  echo $XKB_DEFAULT_MODEL
should return
    ppkb

If NOT, add the following to /etc/systemd/system/phosh.service.d/override.conf:

override.conf

Code:
[Service]
Environment=XKB_DEFAULT_MODEL=ppkb


Step 4
======
In the Settings app in "Phosh -> Settings -> Keyboard -> Alternate Characters Key" select "Left Super"
to have the pinecone key act as Fn used to for the TOP ROW ONLY: Pinecone-[0-9]
The Fn key still worked/works for the arrow, Home, End keys.

Try setting some other special keys if you prefer something else as modifier.
  Reply
#4
For whatever it is worth in this context, for PostmarketOS with SXMO, the keyboard works perfectly out of the bix. AltG gets you the third layer symbols on the numkeys and Pine-numkey gets you the function keys. No mods of any sort required. Being a noob, SXMO was a little challenging, but once you get it, it is perfect for a phone sized device. I just installed nano and away I go. SXMO on a PinePhone makes the phone essentially a terminal with menus and gestures. Very nice.

I don't use Libre Office at all, so I haven't tried that.
  Reply
#5
quote from Hook:

"For whatever it is worth in this context, for PostmarketOS with SXMO, the keyboard works perfectly out of the bix. AltG gets you the third layer symbols on the numkeys and Pine-numkey gets you the function keys..."

Thanks for sharing this. I do not use LibreOffice to this date either, but eventually Abiword if I manage to run it without any issues. 

The PP keyboard has not as many keys as for instance thise one:

https://forum.pine64.org/showthread.php?tid=13835

So I don t know which keyboard to choose for Abiword. This needs to be tested. I saw that there are only 7 shortcuts for Abiword:

https://shortcutworld.com/AbiWord/linux/..._Shortcuts

And I saw the Abiword cannot be controlled by keyboard short cuts, so no special keyboard required for Abiword. But if someone wants to costumize LibreOffice:

https://forum.pine64.org/showthread.php?...#pid120232

a keyboard with as many keys as possible would be very helpful.
  Reply
#6
@ Hook

postmarketOS SXMO is the distro PP & PP keyboard developer Martijn Braam uses in two of his YouTube video demos:

https://youtu.be/z3dTrIa52O4

https://youtu.be/a1kgHRbSFzw

Are there other distros which support the PP keyboard as good as postmarketOS SXMO?
  Reply
#7
I did a short test on my postmarketOS with gnome desktop with the PP keyboard. I am happy with postmarketOS and gnome, but:

-  Alt G to get to the third layer symbols on the numerical keys did not work Angry .

I tested this with Abiword for which I want to use the keyboard for.

-  The Pine key & numerical keys did not get me to the function keys Angry .

I tested this in Gnumeric which supports function keys.

Are these functions of the PP keyboard only supported in postmarketOS SXMO Angry ?
  Reply
#8
There seems to be support for keyboards in the gnome layer that only knows about the 105 keys type.
  Reply
#9
Why then no use an alternative keyboard layout in gnome?

https://help.gnome.org/users/gnome-help/...ts.html.en

But I did not test it and I do not know if it works to get all the keys of the PP keyboard.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Searching for a PinePhone Keyboard Case RubiksCube 1 915 10-07-2024, 11:08 PM
Last Post: tllim
  Seeking your experiences: PinePhone in snug cases of other phones mycycles 9 5,446 08-16-2024, 06:19 AM
Last Post: 67man
  So which keyboard you suggest for the Pinephone? Peter Gamma 21 5,474 07-19-2024, 08:05 AM
Last Post: Peter Gamma
  Rii mini 4 keyboard and touchpad work over Bluetooth Peter Gamma 0 452 07-19-2024, 08:02 AM
Last Post: Peter Gamma
  Keyboards for the PinePhone? Peter Gamma 1 1,485 07-04-2024, 10:22 PM
Last Post: Peter Gamma
  Bring the Pinephone keyboard back, it is worth it! Peter Gamma 1 901 07-04-2024, 07:32 AM
Last Post: Kevin Kofler
Heart The Pinephone keyboard offers alternative layouts Peter Gamma 0 338 07-04-2024, 05:40 AM
Last Post: Peter Gamma
  Keyboard & 2.4G usb dongle for the Pinephone? Peter Gamma 2 1,010 06-29-2024, 09:36 PM
Last Post: Peter Gamma
  Bluetooth keyboard with trackpad Zebulon Walton 11 11,580 06-29-2024, 04:09 AM
Last Post: Peter Gamma
  Was someone able to use the Pinephone keyboard & an usb mouse at the same? Peter Gamma 4 3,120 06-26-2024, 07:11 AM
Last Post: dachalife

Forum Jump:


Users browsing this thread: 7 Guest(s)