Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI: Ctrl+Shift+ hotkeys not working with non-English keymap #4977

Closed
v0s opened this issue Jul 13, 2018 · 50 comments · Fixed by desktop-app/lib_ui#217
Closed

GUI: Ctrl+Shift+ hotkeys not working with non-English keymap #4977

v0s opened this issue Jul 13, 2018 · 50 comments · Fixed by desktop-app/lib_ui#217

Comments

@v0s
Copy link

v0s commented Jul 13, 2018

screen3

Steps to reproduce

  1. Type some text in the chat box.
  2. When EN keymap is active:
  • press Ctrl+Z — the text is undone;
  • press Ctrl+Shift+Z — the text is redone.
  1. Switch to RU keymap:
  • press Ctrl+Z — text is undone, works ok;
  • press Ctrl+Shift+Z — instead of a redo, capital Z gets entered (even despite keymap being RU).

Same applies to Ctrl+Shift+M hotkey for monospace formatting.

Expected behaviour

Even with RU keymap, Ctrl+Shift+Z should redo, and Ctrl+Shift+M should make text monospace.

Actual behaviour

With RU keymap, Ctrl+Shift+ hotkeys do not do the actions, instead they type corresponding capital English letter.

Configuration

Operating system: Windows 10 1709
Version of Telegram Desktop: 1.3.10
Used theme: default

@stale
Copy link

stale bot commented Oct 24, 2020

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!

@stale stale bot added the stale label Oct 24, 2020
@v0s
Copy link
Author

v0s commented Oct 24, 2020

Still there, still annoying

@stale
Copy link

stale bot commented May 1, 2021

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further 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!

@stale stale bot added the stale label May 1, 2021
@v0s
Copy link
Author

v0s commented May 1, 2021

Still there, still annoying.

The behavior changed a bit: now when pressing Ctrl+Shift+Z with RU keymap active, nothing happens (previously uppercase latin Z was typed). Less destructive since it doesn't overwrite undo/redo history, but still hotkey doesn't work as intended

@stale stale bot removed the stale label May 1, 2021
@ghost
Copy link

ghost commented Jun 13, 2021

Same applies to Ctrl+Shift+M hotkey for monospace formatting.

Maybe the "shortcuts-default.json" and "shortcuts-custom.json" could be parsed & mapped internally according to the "key position of M" in the EN layout, and not "M character key" itself?

Also, I can't find the commands for changing the formatting shortcuts in "shortcuts-custom.json". I checked here.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Oct 3, 2021

I'm mostly working on Linux code, but since no one looks into this and there's someone who doesn't allow stale-bot to close the issue, I tried to reproduce it and... I can't.

vokoscreenNG-2021-10-03_08-02-28.mp4

This is a VM with Russian Windows 10 1809

@grandsilence
Copy link

Windows 10 1803, I have that issue on the latest Telegram Beta v3.5.1 (04.02.22).

Function Hot Key English Layout Russian Layout
Bold CTRL+B
Italic CTRL+I
Underline CTRL+U
Strikethrough CTRL+SHIFT+X
Monospaced CTRL+SHIFT+M
Hidden/Private CTRL+SHIFT+P
Add URL Link CTRL+K
Remove formatting CTRL+SHIFT+N

So all CTRL+SHIFT shortcuts is not working for me.

@ilya-fedin
Copy link
Contributor

@grandsilence maybe it is a good reason to update to 1809?

@grandsilence
Copy link

@ilya-fedin unfortunately 1803 is the last Windows version with low latency. It's a lot faster on old hardware. 1809 has 10MHz timer, absolutely no reasons to use 1809, 21h1 faster but slower than 1803.

@v0s
Copy link
Author

v0s commented Feb 16, 2022

@grandsilence maybe it is a good reason to update to 1809?

I don't think it's relevant, i'm on 21H2 and Ctrl-Shift hotkeys are not working with Russian layout on the latest Telegram Desktop

@ilya-fedin
Copy link
Contributor

@v0s what's relevant then? I can't reproduce the problem, Ctrl+Shift hotkeys work just fine on my machine with Russian layout

@v0s
Copy link
Author

v0s commented Feb 16, 2022

@ilya-fedin How can I help in reproducing? I can think of making you a Windows VM in which the hotkeys don't work :-)

@grandsilence
Copy link

@ilya-fedin I can make test environments on 1803, 1909, 2004, 21h1, 21h2 and provide VirtualBox image. Let me know if you need it.

@ilya-fedin
Copy link
Contributor

@v0s yeah, such a VM would be great. I have VirtualBox and libvirt. Although, I would need to make free space somehow apparently 😅

@v0s
Copy link
Author

v0s commented Feb 16, 2022

@ilya-fedin what's the best way to provide a functional instance without giving you access to my Telegram account? :-) E.g. is there a way to maybe register an account on test server, not tied to a phone number? 🤔

@grandsilence
Copy link

@ilya-fedin About 8Gb will be enough actually. 1803 is a tiny OS (especially without Metro Apps).

@grandsilence
Copy link

@v0s I have an empty account and I can give access to it. Or just use any SMS activation service.

@v0s
Copy link
Author

v0s commented Feb 16, 2022

@grandsilence yes please! you can pm me at t.me/mrvos

@ilya-fedin
Copy link
Contributor

@v0s you can remove %APPDATA%\Telegram Desktop after ensuring the bug is reproducible

@ilya-fedin
Copy link
Contributor

I will download a new copy of tdesktop anyway most likely. So you can test with a portable copy and then remove it.

@Aokromes
Copy link
Collaborator

@ilya-fedin I can make test environments on 1803, 1909, 2004, 21h1, 21h2 and provide VirtualBox image. Let me know if you need it.

well, i don't think we need to care about windows under 1909 (all of them unsuported) (and on 3 months under 20h2)

@ilya-fedin
Copy link
Contributor

This issue is now a part of #25126

@github-actions
Copy link

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further 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!

@github-actions github-actions bot added the stale label Mar 24, 2023
@v0s
Copy link
Author

v0s commented Mar 24, 2023

Still there, still annoying

@grandsilence
Copy link

I hope this problem will be fixed someday…

@github-actions github-actions bot removed the stale label Mar 25, 2023
@dragonfrugal
Copy link

screen3

Steps to reproduce

  1. Type some text in the chat box.
  2. When EN keymap is active:
  • press Ctrl+Z — the text is undone;
  • press Ctrl+Shift+Z — the text is redone.
  1. Switch to RU keymap:
  • press Ctrl+Z — text is undone, works ok;
  • press Ctrl+Shift+Z — instead of a redo, capital Z gets entered (even despite keymap being RU).

Same applies to Ctrl+Shift+M hotkey for monospace formatting.

Expected behaviour

Even with RU keymap, Ctrl+Shift+Z should redo, and Ctrl+Shift+M should make text monospace.

Actual behaviour

With RU keymap, Ctrl+Shift+ hotkeys do not do the actions, instead they type corresponding capital English letter.

Configuration

Operating system: Windows 10 1709 Version of Telegram Desktop: 1.3.10 Used theme: default

@grandsilence
Copy link

any news?

@Habetdin
Copy link

Habetdin commented Oct 13, 2023

Telegram Desktop 4.10.2 (Windows 10) has somewhat related problem:

  • CTRL+SHIFT+M doesn't work
  • CTRL+SHIFT+N works as expected
  • CTRL+SHIFT+P works as expected
  • CTRL+SHIFT+X works as expected

Update: Telegram Desktop 4.11.1 still has the issue with CTRL+SHIFT+M.

@megaproes
Copy link

We are here... CTRL+SHIFT+M doesn't work . . .

@0x8008
Copy link

0x8008 commented Mar 14, 2024

CTRL+SHIFT+M still broken on pl keymap under Win10/11

@grandsilence
Copy link

grandsilence commented Mar 14, 2024

Yeah, CTRL+SHIFT+M still not working under Windows 10, RU keyboard.

Telegram Desktop: v4.15.2 x64
Windows 10: 21H2 19044.1288

Working keystrokes for both keyboard layouts:

  • CTRL + B
  • CTRL + I
  • CTRL + U
  • CTRL + K

Not working keystrokes on RU keyboard layout, EN works as expected:

  • CTRL + SHIFT + X
  • CTRL + SHIFT + .
  • CTRL + SHIFT + M
  • CTRL + SHIFT + P
  • CTRL + SHIFT + N

@0x8008
Copy link

0x8008 commented Mar 14, 2024

Every keystroke aside from CTRL+SHIFT+M and CTRL+SHIFT+P seems to work fine for me.

@Starmania
Copy link

Still here

@mitay2
Copy link

mitay2 commented May 16, 2024

Still here. Ubuntu LTS 20.04, TG Desktop 4.16.8.
Ctrl+Shift+M behavior is like Ctrl+M - minimize window.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented May 19, 2024

any news?

Well, I mentioned I added this issue to #25126 which means it needs help with reporting upstream. If someone would make a Qt bugreport complying with Qt's reporting rules, that would likely move the issue forward way faster.

@v0s
Copy link
Author

v0s commented Jun 14, 2024

@john-preston @ilya-fedin fixed partially: markdown hotkeys now work with the custom keymap, but e.g. Ctrl-Shift-Z for redo does not

(thanks for figuring it out and fixing as well!)

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Jun 14, 2024

While those shortcuts were partially under tdesktop control and it was possible to switch them from one Qt API to the other, Ctrl+Shift+Z is completely implemented by Qt, here: https://github.com/qt/qtbase/blob/v5.15.14-lts-lgpl/src/widgets/widgets/qwidgettextcontrol.cpp#L1326

So I don't see a way to fix it.

The already made fix is considered for revert, though, because it broke those shortcuts on macOS completely.

@v0s
Copy link
Author

v0s commented Jun 14, 2024

Ooh i see...

The arleady made fix is considered for revert, though, because it broke those shortcuts on macOS completely.

Can it be perhaps put into a block conditional on target OS? Currently it does solve a problem on Windows

@ilya-fedin
Copy link
Contributor

Can it be perhaps put into a block conditional on target OS?

Not sure. Will see.

@ilya-fedin
Copy link
Contributor

If you can reproduce the redo thing with other Qt applications like qBittorrent, I guess you should be able to report this to Qt? qBittorrent will also show whether this is still an issue with modern Qt (tdesktop still uses 5.15 on Windows while qBittorrent has Qt 6 builds) or is already fixed.

I would recommend reporting it as an issue with standard layouts such as the ukranian enhanced one, rather than a custom one.

@v0s
Copy link
Author

v0s commented Jun 14, 2024

Yep, it does reproduce on beta qBittorrent as well. I know nothing about Qt APIs though to be able to correctly submit a bug report to Qt :(

@ilya-fedin
Copy link
Contributor

I'm sorry but no one else seem to be interested in reporting and if you won't do that, the bug will remain unfixed for another decade. Just report as you can. Mention that the issue happens with both tdesktop and qbittorrent, provide reproduction steps. Specify the Qt versions used by tdesktop and qbittorrent (the tdesktop one is 5.15.13). The components are QPA: Windows and GUI: Basic input system. You can mention that it's likely reproducible with any Qt example using QTextEdit/QLineEdit.

@kekekeks
Copy link

I believe that this recent change has broken markdown shortcuts for all layouts on my machine. Were working perfectly fine before.

@john-preston
Copy link
Member

@kekekeks Can you share some details? One version completely broke markdown shortcuts on macOS and on Linux systems with global menu, but after that there was deployed a fix version. Maybe you need to update in Settings > Advanced > Check for updates?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.