Notepad2e icon indicating copy to clipboard operation
Notepad2e copied to clipboard

Alt+Arrow to invert accelerated mode for single navigation

Open ProgerXP opened this issue 5 years ago • 10 comments

Is it possible to hook two Alt+Arrows (Left and Right) combinations so that they don't trigger any side effects? Asking because Alt is used for &accelerators (main menu, etc.) and it often conflicts in other programs.

If yes then make them move caret as if WordNavigationMode (#89) was inverted. For example, by default Ctrl+Arrow Left moves to the preceding word while Alt+Arrow Left would move to the preceding whitespace. If WordNavigationMode is enabled then Ctrl+Left moves to whitespace and Alt+Left - to word. Ctrl+Alt+Arrow are not affected by this change.

This is like vim's word/WORD motions, e.g. w (word, move by word symbols) and W (WORD, move by whitespace).

ProgerXP avatar Oct 02 '20 14:10 ProgerXP

Please consider changes (committed to temporary branch) related to Scintilla code required for feature implementation.

cshnik avatar Oct 12 '20 19:10 cshnik

This works extremely well.

Add processing of Alt+Shift+Arrow by analogy with Ctrl+Shift+Arrow, i.e. in addition to moving caret make it select the text.

ProgerXP avatar Oct 13 '20 09:10 ProgerXP

Done.

cshnik avatar Oct 14 '20 22:10 cshnik

Great. Merge the branch if ready and delete it.

ProgerXP avatar Jan 13 '21 14:01 ProgerXP

Great. Merge the branch if ready and delete it.

Done.

cshnik avatar Jan 15 '21 15:01 cshnik

Let's add two more similar hotkeys:

  • Alt+Backspace (bW in Vim) - like Ctrl+Backspace, with inverted WordNavigationMode
    • Notepad2 is using it for Undo, remove this binding
  • Alt+Delete (dW in Vim) - like Ctrl+Delete, with inverted WordNavigationMode

ProgerXP avatar Aug 03 '21 18:08 ProgerXP

Let's add two more similar hotkeys:

  • Alt+Backspace (bW in Vim) - like Ctrl+Backspace, with inverted WordNavigationMode

    • Notepad2 is using it for Undo, remove this binding
  • Alt+Delete (dW in Vim) - like Ctrl+Delete, with inverted WordNavigationMode

Done.

cshnik avatar Aug 09 '22 20:08 cshnik

Works but Alt+Backspace produces an audible "beep", as if Windows tries to execute a non-existing hotkey.

ProgerXP avatar Aug 10 '22 09:08 ProgerXP

Works but Alt+Backspace produces an audible "beep", as if Windows tries to execute a non-existing hotkey.

Fixed.

cshnik avatar Aug 17 '22 21:08 cshnik

Let's add two more similar hotkeys:

Must conform to #348.

ProgerXP avatar Oct 09 '22 07:10 ProgerXP

Done. Alt+Backspace/Delete works for current selection (if any).

cshnik avatar Oct 30 '22 21:10 cshnik