#!/bin/bash

function set_keyboard(){
    if type -p xkbset >/dev/null 2>&1 ; then
        xkbset nullify lock
    fi
    # xdotool key  Caps_Lock
    # xte "key Caps_Lock"

    if type -p setxkbmap >/dev/null 2>&1 ; then
        setxkbmap -layout us \
                  -option ctrl:ac_ctrl \
		  -option ctrl:nocaps \
                  -option caps:none \
                  -option shift:breaks_caps \
                  -option compose:lctrl
    fi
}

set_keyboard
ViewGit