Export to GitHub

semicomplete - issue #5

ShiftMask not reset


Posted on Jun 12, 2009 by Helpful Ox

What steps will reproduce the problem?

  1. In an xterm terminal enter:

    xdotool type Hello

What is the expected output? What do you see instead? Expected: Hello What I got: HELLO

What version of the product are you using? On what operating system? xdotool release 20090609, Linux

Please provide any additional information below.

Knee jerk fix (means that I don't know if this is the best solution):

diff --git a/xdo.c b/xdo.c index 095a577..6a6d0be 100644 --- a/xdo.c +++ b/xdo.c @@ -577,6 +577,8 @@ int xdo_type(xdo_t *xdo, Window window, char *string, useconds_t delay) {

 if (shiftcode > 0) {
   modstate |= ShiftMask;

+ } else { + modstate &= ~ShiftMask; }

 _xdo_send_key(xdo, window, keycode, modstate, True, delay);

@@ -606,6 +608,8 @@ int _xdo_keysequence_do(xdo_t *xdo, Window window, char *keyseq, int pressed) { for (i = 0; i < nkeys; i++) { if (keys[i].shift > 0) { modstate |= ShiftMask; + } else { + modstate &= ~ShiftMask; }

 _xdo_send_key(xdo, window, keys[i].code, modstate, pressed, 0);

Comment #1

Posted on Jun 13, 2009 by Massive Bird

The version 20080720 does not have this problem.

Comment #2

Posted on Jun 13, 2009 by Happy Camel

I'll poke at this and push a fix. Thanks for the bug report! :)

Comment #3

Posted on Jun 13, 2009 by Happy Camel

Bug confirmed.

Comment #4

Posted on Jun 14, 2009 by Happy Camel

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium