#!/bin/sh # # Trivial egregious hack to load the console keyboard layout into XKB. [ -e /etc/sysconfig/keyboard ] || exit 0 source /etc/sysconfig/keyboard [ x = "x$KEYTABLE" ] && exit 0 rhplquery () { python -c "import rhpl.keyboard_models; m = rhpl.keyboard_models.KeyboardModels().get_models(); print \"junk='%s' layout='%s' model='%s' variant='%s' options='%s'\" % tuple(m[\"$1\"])" || echo "exit 0" } eval `rhplquery $KEYTABLE` hal_set () { if [ -n "$1" ]; then hal-set-property --direct --udi "$UDI" --key input.xkb.$1 --string "${!1}" else hal-set-property --direct --udi "$UDI" --key input.xkb.$1 --remove fi } hal_set layout hal_set model hal_set variant hal_set options