Re: Patch for keyboard layout switching.
- From: Jeremy Hankins <nowan nowan org>
- To: sawfish-list gnome org
- Subject: Re: Patch for keyboard layout switching.
- Date: Tue, 15 Jun 2010 10:20:20 -0500
Teika Kazura <teika lavabit com> writes:
> If you suffer from keyboard layout switching which suppresses key /
> mouse bindings, please try this patch:
> https://bugzilla.gnome.org/show_bug.cgi?id=583822#c9
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.
#!/bin/zsh
# Parse options
if [[ "$1" == "-v" ]]; then
shift
VERBOSE="true"
fi
if [[ "$1" == "dvorak" || "$1" == "us" ]]; then
map="$1"
elif [[ "$1" == "qwerty" ]]; then
map="us" # special case, for clarity
else
echo "usage: $0 [-v] (dvorak|us|qwerty)" 1>&2
exit 1
fi
# Be verbose
if [[ -n "$VERBOSE" ]]; then
layout=`echo $1 | tr '[:lower:]' '[:upper:]'`
msg="$layout keyboard layout selected."
echo $msg
osdctl -s "$msg ,"
fi
# Make the switch
if [ "$DISPLAY" ]; then
setxkbmap $map
else
loadkeys $map
fi
--
Jeremy Hankins <nowan nowan org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]