Page 1 of 3

Possible Hotkey issue

Posted: 20.08.2024 09:59
by sl23
I don't often use Find/Replace for specific large scale operations, but lately have found the need to do so.
Not knowing regex, I am left with manual or global operation. Global, is not suitable for many of the present operations, so I'm having to do it manually.

As my mouse is rather loud, i am trying to use the F3 and F4 hotkeys to reduce annoying people around me. But I am often finding that they just stop working. For instance, I set up a find replace in the bottom of the window, set the caret position in the editor, press F3, no problem, then press F4, nothing! In fact It only works the once then stops working in other situations. But mostly, it just does not work. I haven't changed the default and have checked it is enabled.

I also have issues with F3 not working too. I perform the same operation as above. Press F3 then L-click Replace, press F3, stops working!

This has been happening for a few years, but rarely required it this way, so never been an issue. During that time, I have had three different keyboards. Two wireless, and my current wired one, so it can't be the keyboard.

Is it a bug or perhaps something in my specific configuration?
Would be a great help to get this resolved please. :)

Re: Possible Hotkey issue

Posted: 20.08.2024 10:07
by sl23
On further inspection, it seems that when I click a spot in the editor to place the caret, this is when the hotkeys stop working

Re: Possible Hotkey issue

Posted: 20.08.2024 11:16
by main Alexey
a. F4 is not a default hotkey. how did you setup it?
b. tell me exact steps to repeat the issue.
e.g.,

- enter text 'dd dd dd dd'
- call Replace dialog, enter 'dd' there
- press F3
-> some bad result

this must be repeated on _clean_ app (no settings at all).
if settings matter, attach your user.json + keys.json (from 'settings' folder).

Re: Possible Hotkey issue

Posted: 20.08.2024 12:36
by sl23
I'll get back to you on this. Little busy at the moment.

Re: Possible Hotkey issue

Posted: 24.08.2024 06:55
by main Alexey
ping...

Re: Possible Hotkey issue

Posted: 27.08.2024 22:48
by sl23
Sorry Alexey. Not had time to do this yet!
Try and get it done tomorrow for you.

Re: Possible Hotkey issue

Posted: 28.08.2024 11:57
by sl23
For some reason I thought F3 and F4 were defaults for Find Next and Replace! :oops:
I remember now, I changed these settings in the settings dialogue window.

TEST 1: (with my portable installation)
Anyway, I've checked this with my Rainmeter code and if I enter the word Scale in the find dialogue at the bottom of the window:
  • Press F3 and it works ok.
  • Click the editor.
  • Click the Find Next button in the dialogue at the bottom right.
  • Press F3 again, and no response.
Repeatable every time for me.

Now I tried to Replace the word Scale with the same word just so it goes through the process of find and replace:
  • After typing in the words in the two fields, I pressed F3 and F4 numerous times at random points, all ok
  • Again, I click the editor field, F3 continues to find the next word, but F4 has stopped responding.
  • Then I click the Find Next button at bottom right
  • F4 still not responding.
  • Click the Replace button, F3 and F4 now work.
Again this is repeatable.

TEST 2: (with fresh portable installation)
F3 is the default Find Next hotkey, but I changed the Replace to F4. and repeated the above steps.
  • Typed in Scale in both Find and Replace fields.
  • F4 not working, restarted CT. Still not working. Double checked I set it right and tried again. Still F4 refuses to respond and replace the text.
  • F3 continues to work no matter what I click on. ie, as above, I clicked on the editor after using find via F3, in the fresh install, it works after clicking the editor field this time.
Any idea on the cause?
Should I upload my settings?

Thanks for your help :)

Re: Possible Hotkey issue

Posted: 28.08.2024 14:01
by main Alexey
let's first talk about 'with fresh portable installation'. I know the reason why F4 don't work with FOCUSED find-dialog.
find-dlg has its own hotkeys.
part of app code to read hotkeys:

UiOps.HotkeyFindFirst:= cfg.GetValue('find_hotkey_find_first', UiOps.HotkeyFindFirst);
UiOps.HotkeyFindNext:= cfg.GetValue('find_hotkey_find_next', UiOps.HotkeyFindNext);
UiOps.HotkeyFindPrev:= cfg.GetValue('find_hotkey_find_prev', UiOps.HotkeyFindPrev);
UiOps.HotkeyReplaceAndFindNext:= cfg.GetValue('find_hotkey_replace', UiOps.HotkeyReplaceAndFindNext);
UiOps.HotkeyReplaceNoFindNext:= cfg.GetValue('find_hotkey_replace_no_next', UiOps.HotkeyReplaceNoFindNext);
UiOps.HotkeyReplaceAll:= cfg.GetValue('find_hotkey_replace_all', UiOps.HotkeyReplaceAll);
UiOps.HotkeyReplaceGlobal:= cfg.GetValue('find_hotkey_replace_global', UiOps.HotkeyReplaceGlobal);
UiOps.HotkeyCountAll:= cfg.GetValue('find_hotkey_count_all', UiOps.HotkeyCountAll);
UiOps.HotkeyExtractAll:= cfg.GetValue('find_hotkey_extract', UiOps.HotkeyExtractAll);
UiOps.HotkeySelectAll:= cfg.GetValue('find_hotkey_select_all', UiOps.HotkeySelectAll);
UiOps.HotkeyMarkAll:= cfg.GetValue('find_hotkey_mark_all', UiOps.HotkeyMarkAll);

as you see, hotkeys of find-dlg are got from mentioned options. F4 is not set by you for these options.
why F3 works? because default of 'find_hotkey_find_next' is F3.

Re: Possible Hotkey issue

Posted: 28.08.2024 14:18
by sl23
...I changed the Replace to F4. and repeated the above steps.
But I did change it?

Unless you are referring to something different? I have no idea what that code is that you posted. I'm not a programmer so it's out of my depth.

Are you saying that Replace already has a designated hotkey and that's why F4 doesn't work, even though I assign a new one?

Re: Possible Hotkey issue

Posted: 28.08.2024 16:53
by main Alexey
you can change Replace-key in 2 ways. which one did you use?

1. set F4 in the Command Palette
2. set string "F4" to option "find_hotkey_find_next" (user.json)

seems you used way-1, but you should use both ways.