Re: Patch for keyboard layout switching.

Teika Kazura <teika lavabit com> writes:
> If you suffer from keyboard layout switching which suppresses key /
> mouse bindings, please try this patch:

This doesn't solve my problem, but looking over the bug report I'm not
certain that I'm experiencing quite the same bug.  I have trouble when I
change keyboard layouts (in my case dvorak/qwerty), but it has nothing
to do with window buttons or the mouse.  It's simply that many (but not
all) keybindings disappear when I switch layouts, and do not reappear
when I switch back.

Attached is the script I use to switch back and forth, if it's of
interest.  Unfortunately my knowledge of keyboard handling is nil.  I
have 'aoeu' set up to run this script with 'qwerty' as the option, and
'asdf' set up to run it with 'dvorak' as the option.


# Parse options

if [[ "$1" == "-v" ]]; then

if [[ "$1" == "dvorak" || "$1" == "us" ]]; then
elif [[ "$1" == "qwerty" ]]; then
    map="us" # special case, for clarity
    echo "usage: $0 [-v] (dvorak|us|qwerty)" 1>&2
    exit 1

# Be verbose

if [[ -n "$VERBOSE" ]]; then
    layout=`echo $1 | tr '[:lower:]' '[:upper:]'`
    msg="$layout keyboard layout selected."
    echo $msg
    osdctl -s "$msg ,"

# Make the switch

if [ "$DISPLAY" ]; then
	setxkbmap $map
	loadkeys $map
Jeremy Hankins <nowan nowan org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]