You are not logged in.

#1 2013-08-20 08:06:17

magthe
Member
From: Gothenburg, Sweden
Registered: 2013-08-19
Posts: 2
Website

Custom keyboard layout and Gnome3

After moving back to my native Sweden I find that the local keyboard is a pain to use for programming (mainly it's the locations of '{[]}' that are painful).  I'm stuck with Swedish keyboards at work, it's mostly laptops so using an external keyboard is not an ideal solution.  Currently my solution is to run the following script

#! /bin/bash

# load XKB, if there is one
XKBDIR=${HOME}/.xkb
XKBMAPFILE=${XKBDIR}/keymap/$(hostname)
if [[ -f ${XKBMAPFILE} ]]; then
    xkbcomp -I${XKBDIR} ${XKBMAPFILE} ${DISPLAY} &> /dev/null
fi

and then put the desired layout changes under ~/.xkb/.  I've then created a .desktop and put it in ~/.config/autostart to run the script on login.  The only problem with this is that the changed layout doesn't survive putting the laptop to sleep or hibernating it.

I'd love to get suggestions for better solutions, solutions that survive sleep/hibernate.

Offline

Board footer

Powered by FluxBB