PythonScript icon indicating copy to clipboard operation
PythonScript copied to clipboard

Input focus left in console window upon startup

Open alankilborn opened this issue 1 year ago • 4 comments

If Show Console is checkmarked when Notepad++ is exited, when Notepad++ is restarted, the user's input focus is at the console window's >>> prompt.

Wouldn't it be a better user experience if his input focus, i.e., blinking caret, is in the main N++ editing area, rather than the PS console? I think so, so I'm requesting this.


Using Notepad++ 8.7.5. Using Python 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)] Using only plugins that ship with N++ and PythonScript plugin.


Workaround:

  • double tap on the Windows key on the keyboard, moves the input focus into the main editing window

See also:

  • https://community.notepad-plus-plus.org/topic/12467/keystroke-to-switch-focus-from-console-window-to-active-editor-tab

alankilborn avatar Dec 27 '24 13:12 alankilborn

Does pressing the ESC key not work for you?

Ekopalypse avatar Dec 27 '24 14:12 Ekopalypse

Does pressing the ESC key not work for you?

ESC does work (I think that's a newer workaround than my double-tap-on-Windows key). The point is, IMO input focus upon startup should not be left in the console window but rather in the editing window.

alankilborn avatar Dec 27 '24 14:12 alankilborn

Another workaround, inspired by @Ekopalypse mention of Esc key:

  • User places this code at end of (user) startup:
import SendKeys as sk
sk.SendKeys("{ESC}")

alankilborn avatar Dec 27 '24 15:12 alankilborn

Agreed, I think it's more likely that if you start Npp and want the console displayed at startup, you'd still want to start editing instead of invoking something from the command prompt. I think this could be implemented if it is accepted as a feature request.

Ekopalypse avatar Dec 27 '24 15:12 Ekopalypse