With a PinePhone and its physical keyboard and Manjaro/xfce, I’m trying to build a simple script that will send a command to go into Insert Mode, type a character, and then return to Overwrite Mode, and exit.
Using xdotool, one rub is the kb’s Insert Mode is Fn + ; and my searches show a lot of issues with xdotool and a hard-coded Fn key.
With:
xmodmap -e "keycode 108 = Insert Insert"
I can circumvent possible Fn issues by successfully turning the unused AltGr key into an Insert/Overwrite key.
But I still don’t know how to call either the AltGr or Fn + ; in a script to toggle to Insert Mode and then back again to Overwrite.
Thanks again. While typing ‘x’ works, xdotool key 'Insert'; does not change to Insert Mode (or back) when calling said command in either LibreOffice or Abiword.
You did it. Both commands produce the desired results.
The reason behind this arcane script is because the PinePhone’s cpu can’t keep up with LibreOffice (laggy typing, etc), which forces a move to Abiword. And with these small screens, the easiest display on the eyes is white text on black background. But black background hides Abiword’s black cursor (Abiword cursor color can’t be changed). Abiword does use a red cursor when in Overwrite Mode, but Insert Mode is needed when adding special characters (called from script) so as not to overwrite other text.
More information than you wanted, I’m sure, but your knowledge/patience provided the solution and I’ve marked it as such.
Sometimes I guess you just need to keep trying slightly different invocations
Glad its worked out … and hopefully there will be a more generally good solution in the future.