Over a million developers have joined DZone.

Console Keyboard Scheme Switcher

·
Switches between us and swedish (or any other)
keyboard-scheme in the console. Default is US.


#!/bin/sh
# Keyboard switcher script
# Written in 2006 by Davor Babic 
# This software is realeased into public domain

case $1 in
sv)
    echo "Switching to swedish keyboard layout."
    loadkeys /usr/share/keymaps/i386/qwerty/se-latin1.kmap.gz
    ;;
us)
    echo "Switching to US keyboard layout."
    loadkeys /usr/share/keymaps/i386/qwerty/us.kmap.gz
    ;;
default)
    echo "None selected. Loading US..."
    loadkeys /usr/share/keymaps/i386/qwerty/us.kmap.gz
    ;;
esac
Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}