telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.26k stars 5.22k forks source link

Linux: support copy&paste functionality (XF86Copy, XF86Paste, XF86Cut, XF86Undo, XF86Redo, etc...) #5835

Closed mikkovedru closed 3 years ago

mikkovedru commented 5 years ago

I am a keyboard power user and in that I am greatly helped by the DreymaR's Extend. The idea is simple: use the separate Extend key (by default mapped to CapsLock key), which opens up a bunch of functionality without the need to move my fingers too much. image In practice it's even more amazing and useful than one could imagine.

The problem is that the basic functionality of Cut/Copy/Paste/Undo/Redo doesn't work in Telegram. It works in OS, it works in Firefox, it works in LibreOffice and everywhere else, but sadly it doesn't work in Telegram Desktop.

Steps to reproduce

  1. Install Extend.
  2. See for yourself that although other buttons work, the Cut/Copy/Paste/Undo functionality doesn't work in Telegram (for example in Firefox/LibreOffice everything works fine).

Expected behaviour

XFree86 has a bunch of XF86 keyboard symbols and the vast majority of them are not relevant to Telegram. But there is a number of them that are highly relevant. At the very least:

It would be very nice to fix Telegram Desktop to support them.

If one has time, one could additionally look at implementing other shortcuts such as: (- XF86Back?) (- XF86Clear?) (- XF86Forward?) (- XF86Go?) (- XF86History?) (- XF86Search?)

Configuration

Operating system: Linux Mint 19.1 Cinnamon (4.0.9).

Version of Telegram Desktop: 1.6.1.

Used theme: Classic.

vitlav commented 5 years ago

Are you sure about other Qt5 based applications works with it?

mikkovedru commented 5 years ago

@vitlav . I don't know which application works with what. If you could you give me several examples of the Qt5 based applications then I could test them and report the results here.

ilya-fedin commented 4 years ago

If you could you give me several examples of the Qt5 based applications then I could test them and report the results here.

VLC, qBittorrent

mikkovedru commented 4 years ago

It works in both VLC and qBittorrent.

Linux Mint 19.3 Cinnamon (4.4.8).

ilya-fedin commented 4 years ago

How can I emulate these keys to test myself?

mikkovedru commented 4 years ago

I don't know if it is the easiest way, but you can:

  1. install the DreymaR's Extend: https://forum.colemak.com/topic/1438-dreymars-big-bag-of-keyboard-tricks-linuxxkb-files-included/ https://github.com/DreymaR/BigBagKbdTrixXKB
  2. Enable it in settings: image
  3. Use CAPS LOCK + (X, C, V) to test the functionality.
ilya-fedin commented 4 years ago
1. install the DreymaR's Extend:

How can I test without that?

mikkovedru commented 4 years ago
  1. I don't know what kind of signals some specific keyboards send. Some of them might be of the needed format and you can get the keyboard to test.

  2. Or you can make your own little application that would send necessary keys.

  3. Maybe you can find some program that would allow you to easily change the button combinations? Maybe something like AutoKey ( not to be confused with the similar Windows' program AutoHotKey )?

  4. Or you could edit your keyboard files ( /usr/share/X11/xkb/ ). You can see the examples in the Extend files (https://github.com/DreymaR/BigBagKbdTrixXKB/tree/master/xkb-data_mod/xkb) like here ( https://github.com/DreymaR/BigBagKbdTrixXKB/blob/master/xkb-data_mod/xkb/symbols/extend ): image

I my opinion installing Extend is a way easier/cheaper option.

ilya-fedin commented 4 years ago

I my opinion installing Extend is a way easier/cheaper option.

Not with my distro :see_no_evil:

mikkovedru commented 4 years ago

What kind of distro do you have?

Another option is to use VirtualBoxvVMWare, install Linux Mint, Extend and test everything in that virtual installation :-)

ilya-fedin commented 4 years ago

What kind of distro do you have?

NixOS

stale[bot] commented 4 years ago

Hey there!

This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

mikkovedru commented 4 years ago

This issue is not resolved and I have definitely not lost interest. It's just that I can't fix the issue by myself and am at a mercy of other people.

ilya-fedin commented 4 years ago

It's just that I can't fix the issue by myself and am at a mercy of other people.

Well, I have no idea how to implement this and I guess @john-preston as well, so, without a person that know how to implement this, this couldn't be implemented.

ilya-fedin commented 3 years ago

@mikkovedru how tdesktop is installed on your system? looks like this mod installs some xkb configs and if you're using snap or flatpak, it won't work.

mikkovedru commented 3 years ago

@ilya-fedin I downloaded the Telegram Desktop from the official web page, extracted it, put in the directory and created the shortcut on my Desktop.

ilya-fedin commented 3 years ago

will these custom keybinds work if you install telegram from your distro repositories that uses system Qt?

mikkovedru commented 3 years ago

@ilya-fedin No. :-(

ilya-fedin commented 3 years ago

Have you checked the search field?

ilya-fedin commented 3 years ago

@mikkovedru

mikkovedru commented 3 years ago

@ilya-fedin Yes, I checked both the search field and the message writing fields. None of them work.

ilya-fedin commented 3 years ago

Yes, I checked both the search field and the message writing fields. None of them work.

Are you 100% sure that it works in other Qt applications like qBittorrent? I have a feel that you confused something when you checked previously.

uqs commented 3 years ago

I'm currently playing around with QMK and KC_PASTE, which sends XF86Paste, which works perfectly fine in XTerm and Firefox, but I can confirm that it does nothing for a Qt5 programm (Clementine-Player).

ilya-fedin commented 3 years ago

So, this is not supported on Qt level and should be requested at Qt bugreport platform instead

no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.