Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using openSuse. It was installed for me by the IT group here at work this week. I routinely use Shift+Ctrl+ some arrow key to highlight text, and I'm in the habit of simply typing in order to replace the text that has been highlighted.

If I highlight the text with the mouse and start typing, everything works fine. If I highlight the text using the keyboard combination, then the first character I type deletes the highlighted text and the second does nothing, then the remainder of the characters I type are put as a replacement to the highlighted text. This behavior appears to happen regardless of application. I've seen it in Google chrome (although not the URL bar), Firefox, and in Eclipse text editors.

I have no idea what's going on, but it's really annoying and slowing me down in Eclipse. I can get around in linux, but I'm no guru. Where should I look to figure out what is going on?

Update: I'm in Gnome. I've seen the behavior in Open Office writer, Google Chrome, Firefox, Eclipse, Thunderbird. I did not see it in Tomboy Notes or gedit.

share|improve this question

2 Answers 2

So you would expect the first and second characters to overwrite the selected text, right?

What does xev print?
(Run it from a terminal, then move the mouse over the window, then press
Ctrl Shift Left Left a b)

For me, it does this.

Pressing and holding Ctrl then Shift...

    KeyPress event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143718968, (47,65), root:(48,147),
        state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False

    KeyPress event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143719024, (47,65), root:(48,147),
        state 0x14, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False

then Left, Left...

    KeyPress event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143720176, (47,65), root:(48,147),
        state 0x15, keycode 113 (keysym 0xff51, Left), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False

    KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143720280, (47,65), root:(48,147),
        state 0x15, keycode 113 (keysym 0xff51, Left), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

    KeyPress event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143720952, (47,65), root:(48,147),
        state 0x15, keycode 113 (keysym 0xff51, Left), same_screen YES,
        XLookupString gives 0 bytes: 
        XmbLookupString gives 0 bytes: 
        XFilterEvent returns: False

    KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143721040, (47,65), root:(48,147),
        state 0x15, keycode 113 (keysym 0xff51, Left), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

then letting go of Ctrl and Shift...

    KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143723304, (47,65), root:(48,147),
        state 0x15, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

    KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143723304, (47,65), root:(48,147),
        state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

then pressing a, b

    KeyPress event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143724576, (47,65), root:(48,147),
        state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
        XLookupString gives 1 bytes: (61) "a"
        XmbLookupString gives 1 bytes: (61) "a"
        XFilterEvent returns: False

    KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143724672, (47,65), root:(48,147),
        state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,
        XLookupString gives 1 bytes: (61) "a"
        XFilterEvent returns: False

    KeyPress event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143725048, (47,65), root:(48,147),
        state 0x10, keycode 57 (keysym 0x62, b), same_screen YES,
        XLookupString gives 1 bytes: (62) "b"
        XmbLookupString gives 1 bytes: (62) "b"
        XFilterEvent returns: False

    KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
        root 0x109, subw 0x4c00002, time 143725136, (47,65), root:(48,147),
        state 0x10, keycode 57 (keysym 0x62, b), same_screen YES,
        XLookupString gives 1 bytes: (62) "b"
        XFilterEvent returns: False

I would look especially at the last two blocks, i.e. when releasing Ctrl and Shift and then when pressing a b to see if there are any differences.

Other thoughts:

  • do you have Sticky Keys on?
  • do you have Ctrl+Shift set to change the keyboard layout or language?
share|improve this answer
    
My xev output looks almost identical to yours. The difference being in every case my subw is 0x0, and on the letter b, the keycode is 56 instead of 57. Other than that, it's just the position and times that are different. I checked and sticky keys are not on. I don't see any mapping in the keyboard shortcuts for ctrl+shift to anything, and there is nothing mapped to change the keyboard layout. I selected my keyboard model exactly and still the same behavior. Thanks for all the pointers though. –  digitaljoel Jan 28 '11 at 16:21

This has been bugging me for some time now as well.

Worked out that using left Ctrl rather than right Ctrl (which I was doing all the time because it is closer to arrow keys) eliminates the problem.

I wonder why and whether can this be changed somewhere in configuration? I am also using openSuse and Eclipse.

EDIT: Solved it by using .Xmodmap file as instructed here: http://forums.opensuse.org/showthread.php/450727-How-to-change-or-disable-compose-key-in-OpenSuse-11-3

The right - ctrl is a compose key for multi-key characters by default, hence this issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.