74

I've been using Notepad++ more as my primary code editor. Just a few minutes ago, however, I accidentally pressed some combination of keys (no idea what I pressed) and suddenly my standard shortcut keys no longer work.

When I press Ctrl-S, it doesn't save my document; instead it inserts this funky little "DC3" character (looks like a rounded black rectangle with white text inside). When I press Ctrl-F (the Find key) I get a similar "ACK" symbol.

The only answer I've found on the web has to do with changing your shortcut key mappings; however my shortcut key mappings have NOT CHANGED at all, they are still set as they should be, with Ctrl-S mapping to "Save" and Ctrl-F mapping to "Find..".

I've clearly switched to some bizarre alternate key mode, but I have no idea what that might be or how to get rid of it.

Update: I've played around a bit more to see what other shortcuts are broken. So far, they all seem to be, except for the Windows standard ones like "Ctrl-X" and "Ctrl-V". Here's a sampling:

KEY             Should Do:            Current Behavior:

Ctrl-Tab        Cycle open tabs       <does nothing>
Ctrl-W          Close current tab     [ETB]
Ctrl-N          Open New tab          [SO]
Ctrl-O          File Open window      [SI]
Ctrl-A          Select All            [DC3]
Ctrl-Z          Undo                  <Works as expected>
Ctrl-C          Copy selection        <Works as expected>
Ctrl-U          Make lowercase        [NAK]
Brian Lacy
  • 3,391

3 Answers3

104

Ok, this is pretty pathetic. But it's possible some other moron could run into this issue so I feel justified in posting.

A few minutes ago I did a "Replace all" in my current document. Apparently, the dialog window informing me that "# occurrences were replaced" was hidden under another window, so I never closed it.

And apparently, when that little window remains open, pressing shortcut keys with the main editor window in focus causes those funky results.

It's strange behavior, to be sure, but it's still a pretty newb-ish scenario. Ah well.

Brian Lacy
  • 3,391
1

Check the language bar. It's possible you set the language or keyboard differently for that application.

Do any other applications have this issue?

Broam
  • 4,084
0

As an addon to Brian's answer:

Old Notepad++ bug when you have any popups open

This seems to be an old bug inside Notepad++

The first report I found was from 2010: https://notepad-plus-plus.narkive.com/R7BQacOI/notepad-ctrl-s-no-longer-saves-file-and-instead-inserts-dc3-control-character , https://archive.is/wip/oROp0

Here is a video demo with solution from 2016: https://www.youtube.com/watch?v=CTcoMa19huY , https://www.youtube.com/watch?v=CTcoMa19huY

Here is a thread on the NPP forums from 2018: https://community.notepad-plus-plus.org/topic/15803/notepad-7-5-6-inserts-ascii-control-codes-like-dc3-for-control-s-without-any-background-dialogues-open-when-unix-lf-utf-8-w-o-bom-format-is-used , https://archive.is/J3xbk

I found two bug reports that mention "DC3". Unfortunately none of them ended up fixing anything.

And as for the Brian's table: I guess: The ascii table (in hex) is here:

$ ascii -x
   00 NUL    10 DLE    20      30 0    40 @    50 P    60 `    70 p
   01 SOH    11 DC1    21 !    31 1    41 A    51 Q    61 a    71 q
   02 STX    12 DC2    22 "    32 2    42 B    52 R    62 b    72 r
   03 ETX    13 DC3    23 #    33 3    43 C    53 S    63 c    73 s
   04 EOT    14 DC4    24 $    34 4    44 D    54 T    64 d    74 t
   05 ENQ    15 NAK    25 %    35 5    45 E    55 U    65 e    75 u
   06 ACK    16 SYN    26 &    36 6    46 F    56 V    66 f    76 v
   07 BEL    17 ETB    27 '    37 7    47 G    57 W    67 g    77 w
   08 BS     18 CAN    28 (    38 8    48 H    58 X    68 h    78 x
   09 HT     19 EM     29 )    39 9    49 I    59 Y    69 i    79 y
   0A LF     1A SUB    2A *    3A :    4A J    5A Z    6A j    7A z
   0B VT     1B ESC    2B +    3B ;    4B K    5B [    6B k    7B {
   0C FF     1C FS     2C ,    3C <    4C L    5C \    6C l    7C |
   0D CR     1D GS     2D -    3D =    4D M    5D ]    6D m    7D }
   0E SO     1E RS     2E .    3E >    4E N    5E ^    6E n    7E ~
   0F SI     1F US     2F /    3F ?    4F O    5F _    6F o    7F DEL

And I think what happens when CTRL-W inserts "ETB" is that ASCII "W" 0x57 loses 0x40 and turns into 0x17 ETB.

There seems to be a negative 0x40 (decimal 64) offset in all cases.

(Except CTRL-A but I think Brian may have mixed that up with CTRL-S instead. -- Brian's table maps CTRL-A to DC3 But all the other reports I have read map CTRL-S to DC3 instead.

KEY      Should Do:             Current Behavior:

Ctrl-Tab Cycle open tabs <does nothing> Ctrl-W 0x57 Close current tab 0x17 [ETB] Ctrl-N 0x4E Open New tab 0x0E [SO] Ctrl-O 0x4F File Open window 0x0F [SI] Ctrl-A Select All 0x13 [DC3] Ctrl-Z Undo <Works as expected> Ctrl-C Copy selection <Works as expected> Ctrl-U 0x55 Make lowercase 0x15 [NAK]

Details regarding the relationship between "CTRL-W", "^W", 0x17 and 0x57: