[FreeNX-kNX] Keyboard layout
David Mohr
damailings at mcbf.net
Thu May 28 14:12:20 UTC 2009
On Wed, May 27, 2009 at 11:52 PM, Yang Zhang <yanghatespam at gmail.com> wrote:
> Hi, I frequently switch between (US English) qwerty and dvorak keyboard
> layouts, on both my Windows laptop (NX client) and my GNOME Ubuntu
> workstation (FreeNX server). However, I find that I can't seem to get a
> Dvorak layout when using NX - hitting the hotkey that normally switches
> my Windows keyboard layout doesn't do anything for the NX window. Ditto
> with the hotkey that switches my GNOME keyboard layout.
>
> Any hints on how I might go about getting Dvorak? Thanks in advance!
I have a little script which works just fine for me to switch between
us and dvorak layouts in NX:
---SNIP---
#!/bin/sh
DVORAK=`setxkbmap -print | grep dvorak`
XMM="xmodmap $HOME/.Xmodmap"
OPTS="-model pc105 -rules xorg -option lv3:ralt_switch -option eurosign:e"
VARIANT="'intl,winkeys'"
DV="setxkbmap $OPTS -layout dvorak"
US="setxkbmap $OPTS -layout us"
BASENAME=`basename $0`
if [ "$BASENAME" == "keyb-us" ]; then
$US
$XMM
exit 0
fi
if [ "$BASENAME" == "keyb-dv" ]; then
$DV
$XMM
exit 0
fi
if [ -z "$DVORAK" ]; then
$DV
else
$US
fi
$XMM
---SNAP---
Usually I save it as `switch-layouts'. When called by that name it
will toggle between us and dvorak, and then I symlink keyb-dv and
keyb-us to it, for when I just want to get one of the layouts.
~David
More information about the FreeNX-kNX
mailing list