quicktext icon indicating copy to clipboard operation
quicktext copied to clipboard

Problem with numbers

Open Messo8080 opened this issue 5 years ago • 5 comments

Hello everyone

I found 1 bug with this Addon.

when i creating new mail with activated addon Quicktext and i need to change activity of new mail compose to other window, for example Firefox, or something else, after return to composing window, i can not write any numbers any more, also not numeric keys. I can not add number from any key, only with copy&paste from other document.

I found feature which is responsible for that bug. It is "Advanced mode for shortcuts"

After disable this function i can write numbers without problem.

Info: OS: Fedora 31 (wayland) Thunderbird: v68.6.0 64-bit Quicktext: v2.15

Screenshot from 2020-03-19 10-57-28

Messo8080 avatar Mar 19 '20 10:03 Messo8080

I have the same problem and it's very debilitating because the advanced mode for shortcuts is extremely useful.

bepolymathe avatar May 26 '20 12:05 bepolymathe

I allow me to deliver a message because I've been testing all day again and this problem remains. Quicktext is only usable for me if I can type the numbers... and I don't want to disable the auto-insert feature. It would be really wonderful if this problem could be solved. Thank you in advance.

bepolymathe avatar May 29 '20 17:05 bepolymathe

I never understood this feature, it was like a black box to me when I took over this add-on. What does it do?

jobisoft avatar Jun 03 '21 13:06 jobisoft

With "Advanced" shortcuts:

image

Without "Advanced"

image

It looks like advanced gives you a way to use more than 9 shortcuts by holding your chosen special key (meta/alt/ctrl) and typing a possibly multi-digit number then releasing the special key.

This works by listening for keydown events. If the key is your special one, it remembers in a variable mShortcutModifierDown, then when a number key is detected, the number is added to a buffer instead of being normally processed. Then by listening on keyup and detecting the special key, the action is taken if it was the modifier key that was 'up'-ed, and if the shortcut number exists. Then it sets mShortcutModifierDown = false which should mean that number keys are no longer intercepted.

I suspect the problem is something to do with failing to clear the mShortcutModifierDown variable on keyup.

I notice, for example, that when I have a short cut as 1, holding Alt, pressing 1 immediately does shortcut 1, whereas I think it should be waiting for keyup. nope, I just hadn't pressed Save.

artfulrobot avatar Sep 09 '22 08:09 artfulrobot