Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xdotool and keyboard layout

Problem

I am trying to do:

xdotool type 'date;'

but instead of the expected

date;

I get:

dateq

I have a greek keyboard, but when I issue the command the language is set to US. A note: when greek language is used, the key 'q' of the keyboard is used for the semicolon ';' (this is the default behavior/mapping)

Question

What can I do to get a semicolon with xdotool's type?

Some info

I am on Xfce 4.8 on XUbuntu

$ xfce4-terminal -V
xfce4-terminal 0.4.8 (Xfce 4.8)

$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,gr
variant:    ,
options:    grp:caps_toggle
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+gr:2+inet(evdev)+capslock(grouplock)
geometry:   pc(pc105)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+gr:2+inet(evdev)+capslock(grouplock)"    };
    xkb_geometry  { include "pc(pc105)" };
};

$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.2 LTS
Release:    12.04
Codename:   precise
like image 327
vkats Avatar asked Jul 25 '13 08:07

vkats


People also ask

What is xdotool?

xdotool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.


1 Answers

try

setxkbmap <yourlocale>

before calling xdotool

like image 129
fazae Avatar answered Sep 23 '22 03:09

fazae