Inelegant fix for the pipe "|" key problem

Following is a total hack I used to fix the inappropriate keyboard mapping on the purism machines. Specifically, this comes up with installing non-PureOS distros on the Librem machines. I have tested this only on Ubuntu so far. This basically creates a systemd service that corrects the mappings on boot. Yes there are other (and probably better) ways of doing this - this was the fastest I could come up with that met my needs. This is part of a bigger config script/suite I’m working on.

To use this put the following in a shell file, e.g. “fixkeys.sh” (via opening terminal and using e.g. “nano fixkeys.sh”), make executable via “chmod +x fixkeys.sh”, then execute it via “./fixkeys.sh”. Then enjoy your pipe.

KEYFIX_SERVICE=“purism_keyfix”
KEYFIX_SCRIPT="/usr/bin/$KEYFIX_SERVICE.sh"
#create systemd service
cat > /etc/systemd/system/purism_keyfix.service << EOL
[Unit]
Description=purism keyfix service

[Service]
ExecStart=$KEYFIX_SCRIPT

[Install]
WantedBy=multi-user.target
EOL

#create associated script
cat > $KEYFIX_SCRIPT << EOL
#!/bin/bash
setkeycodes 56 43
EOL

#enable service after making script executible
chmod +x $KEYFIX_SCRIPT
systemctl start $KEYFIX_SERVICE
systemctl enable $KEYFIX_SERVICE