Page 1 of 1

Replace / Main Window - keyboard toggle command

Posted: Fri Aug 15, 2014 10:12 pm
by IzzyB
If I understand correctly TextPad's Replace dialog is Non-Modal.

I can call Replace from the keyboard with F8(SearchReplace). I can return to the main edit window with an appropriate click. Replace stays open. Subsequently I can continue that toggling.

But - I've been unable to find a keyboard command to replace the 'click' described above.

Question: What keyboard command will switch from the Replace dialog to the main edit window leaving Replace open?

tia

Posted: Sat Aug 16, 2014 12:20 am
by ak47wong
There is a command, ActivateDocument, for giving the focus to the document window, but you will need to assign a shortcut key to use it:
  1. Click Configure > Preferences.
  2. Click Keyboard.
  3. Under Categories, select View.
  4. Under Commands, select ActivateDocument.
  5. Under Press new shortcut key, type the keystroke you want to use (e.g. Ctrl+`).
  6. Click Assign
  7. Click OK.

Posted: Sat Aug 16, 2014 3:12 am
by IzzyB
Thanks for the very quick reply.

I thought I'd tried ActivateDocument, which in my installation was bound to Alt+0 (I'm pretty sure that's a default). But, no joy...

Per your advice, I assigned an *additional* key (Shift+F8) to ActivateDocument -- It works nicely. Odd, that...

So, I mucked around a bit more in the key bindings, setting Shift+F8 only, Shift+F8 with Alt+0 and even removed and re-assigned the Alt+0 binding.

TextPad's behavior seems quite consistent. Your advice works, Alt+0 doesn't.

Conceptually, am I missing something here?

This isn't the first bit of funky-ness I've seen in the keyboard bindings...

Thanks again.

ps: I neglected to mention the context in my opening post, it's: TextPad 7.2.0, 32 bit and Win 7 Pro, 64 bit

Posted: Sat Aug 16, 2014 8:37 am
by ak47wong
In a dialog box, Windows interprets Alt keystrokes as keyboard accelerators. For example, if you assign Alt+I to a command in TextPad, it will perform that command in the main program window, but in the Replace dialog it gives focus to the Find what field. You will notice that Alt+0 does work in the main TextPad window. I suggest you stick with Shift+F8 :)

Posted: Mon Aug 18, 2014 6:02 pm
by IzzyB
I'm with you on that.

Menu items too, I'd hazard. Not that I've ever seen a menu with zero as a shortcut key...

Thanks again for the replies and the well placed whomp, up side my head.