This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Ctrl+C and Ctrl+X not working in kwrite

Tags: None
(comma "," separated)
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Hi there,

I'm having a really strange problem: The keyboard shortcuts Ctrl+C (for Copy) and Ctrl+X for cut don't work anymore in kwrite (or rather the KDE text component as it doesn't work in kate either).

When I press Ctrl+C nothing is copied to the clipboard. Consequently, when I press Ctrl+V some old clipboard content is pasted (or nothing if the clipboard was empty). Nothing shows up in klipper's history either.

Ctrl+X is even more weird: When I press Ctrl+X the selected text is actually cut from the document, but it's not copied to the clipboard (so the text would be completely gone after pressing Ctrl+X if it wasn't for the "Undo" function).

If I don't use shortcuts but rather right-click on the text and select "Cut" or "Copy" from the menu, everything works fine.

I already tried resetting all shortcut-related settings to their defaults but that didn't help. Either way, the shortcuts seem to be working, since pressing Ctrl+X actually does something (though it's not working correctly).

Any ideas what could be wrong here?

Last edited by Vortex375 on Sat Aug 14, 2010 11:31 am, edited 3 times in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you have Klipper running, have you tried closing it?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Klipper in fact seemed to be the culprit. After resetting (removing) klipper's configuration the issue is gone.

As I'm having this issue on two machines I have to check whether this "fix" works on the other machine as well.

Thank you very much for this hint. :)

Isn't it strange though, that only KDE applications were affected, while copy/paste worked fine in GTK apps (e.g. firefox)?

EDIT: Okay, resetting klipper config fixes this issue.
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS

Problem reappeared

Fri Jul 23, 2010 6:54 pm
Unfortunately the issue has reappeared after just a short while.

It happens on two machines and one of them runs KDE 4.4.5 (stable) while the other runs KDE 4.5 RC 2.

After a while Ctrl+C/X just stop working, but only for Qt4 applications. I also tried with some non-kde Qt4 apps and it didn't work there either.

Copy/Paste in gtk apps works as usual and copied strings show up in klipper as normal.

Copy/Paste in Qt4 apps only works when using the context menu but not by pressing Ctrl+C or Ctrl+X.

Everything works as soon as I close klipper, but of course I don't get the nice clipboard history then.

I can live with disabling klipper for now, but it's really strange. :(
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please file a bug aganist Klipper at bugs.kde.org if one does not already exist, so that this can be fixed.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Actually I just noticed, that even without klipper it's not working correctly:

I can cut/copy text with Ctrl+X or Ctrl+C but then I can only paste it into the same window.

For example in kwrite, I can cut some text and paste it somewhere else in the same document.
I cannot paste the copied text into another application or even another kwrite window!

The problem seems to be with copying, not with pasting. I can not copy from a Qt to a Gtk application, but the other direction works (always).

Copying from a Qt application into another app only works by right-clicking.

When klipper is running not even pasting into the same application works.

EDIT: Just tried, and everything works with a clean user account (i.e. no user specific settings).

I might have no other chance than to reset my whole kde and Qt configuration. :( Still, there is no guarantee that the error won't reappear.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The files ~/.kde4/share/config/kdeglobals or ~/.config/Trolltech.conf are likely the ones at fault. Can you try removing them?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Unfortunately, removing these files messses up fonts and colors, but does not fix the issue. :(
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you use any keyboard layouts, try removing "keyboardrc" ( from ~/.kde4/share/config ) then logout and back in again.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
I just can't get rid of this problem:

I removed the whole ~/.kde4 directory and Trolltech.conf.

After a few logins the problem is back.

Copy-paste into the same window works when klipper is disabled. Copying across windows only works by right-clicking.

Are there other Qt-specific config files that might be interfering?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately i'm out of ideas at this point...


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Unfortunately upgrading to KDE 4.5 (release) has changed nothing. I still can't use Ctrl+C / Ctrl+V in KDE applications. :(

Am I really the only one having this problem?

EDIT: And still, even removing the complete ~/.kde4 directory and Trolltech.conf does not help!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Have you tried a completely new user?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Vortex375
Registered Member
Posts
102
Karma
0
OS
Ah, I think I've found the cause for the bug (how come I didn't think of this earlier? ;D ).

I had been using the ibus input method (http://code.google.com/p/ibus/) to be able to input Japanese.

Apparently it has issues with Qt applications. Since I disabled ibus my shortcuts are working again.

I removed these entries from my ~/.xprofile:
Code: Select all
export XMODIFIERS=@im=ibus
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="ibus"


Now that I know the cause, where should I file a bug report? Qt, KDE or the ibus project? :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This should be filed with the ibus project.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]