dail8859 / SurroundSelection

Notepad++ plugin to automatically surround the selection in quotes/brackets/parenthesis
GNU General Public License v2.0
55 stars 5 forks source link

[Bug] When enabled can't type accented chars #12

Closed fjcbs closed 4 years ago

fjcbs commented 5 years ago

When pluggin enabled, when typing accented chars like "á" or "ö" the accent is printed twice and can't add the other char resulting in something like "´´a" or "¨o"

dail8859 commented 5 years ago

You'll need to provide more details. Notepad++ version, plugin version, file encoding, etc. I typed á and ö by doing Alt+0225 and Alt+0246.

accent

dail8859 commented 5 years ago

Closing as I cannot reproduce the issue. Please reopen with more details if the issue persists.

fjcbs commented 5 years ago

Hello and thank you for your reply.

I'm using versions: Notepad++ v7.7.1 (32bit) SurroundSelection v1.2 (32bit) (home pc) The problem is also present on the 64 bit Notepad++ and plugin versions (at my work PC).

You are correct. When using Alt+0nnn the problem does not occur.

It only happens when using the keyboard set to a foreign language (like Portuguese - wish is my native language). In a foreign keyboard configuration you type the accented chars like: Press accent key (and release) and then press letter key - the operating system or editor only displays the accented char after the second key press. The issue I reported relates to the accent being displayed (repeated) after the first keystroke... So if you press "´" followed by "a" you get "´´a" instead of the correct "á".

dail8859 commented 5 years ago

Apologies for the long delay.

It only happens when using the keyboard set to a foreign language (like Portuguese - wish is my native language).

Since I don't have a non-English keyboard do you know how I can test this myself? Is there some configuration within Windows (specifically Windows 7) that I can use to test this with?

fjcbs commented 5 years ago

Hi there. In Windows, you can install multiple keyboard settings.

dail8859 commented 4 years ago

I know it is been a while but I finally got back around to trying this out.

I used SurroundSelection v1.4 with the below Notepad++

Notepad++ v7.8.1   (32-bit)
Build time : Oct 27 2019 - 22:46:07
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS Name : Windows 7 Home Premium (64-bit) 
OS Build : 7601.0
Plugins : BetterMultiSelection.dll DoxyIt.dll DSpellCheck.dll ElasticTabstops.dll mimeTools.dll NppConverter.dll NppExport.dll SurroundSelection.dll 

I am not able to replicate this issue.

accent

ikeblaster commented 4 years ago

@dail8859 Can confirm this. Czech layout. Removing this plugin fixes that.

npp

Notepad++ v7.8.2   (32-bit)
Build time : Dec  4 2019 - 01:36:59
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit) 
OS Version : 1903
OS Build : 18362.476
Plugins : BetterMultiSelection.dll ComparePlugin.dll ElasticTabstops.dll FingerText.dll IndentByFold.dll LineFilter_Unicode.dll mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppTextFX.dll npp_tabs.dll PythonScript.dll SurroundSelection.dll VisualStudioLineCopy.Unicode.dll _CustomizeToolbar.dll 
dail8859 commented 4 years ago

@ikeblaster I tried a Czech layout as well and did exactly what you did but do not get the same results. My guess would be a Windows 7 vs Windows 10 issue. Since I don't have a Windows 10 development machine, it is unlikely I'll be able to fix anytime this soon.

ikeblaster commented 4 years ago

@dail8859 Sounds like this problem: https://stackoverflow.com/questions/1964614/toascii-tounicode-in-a-keyboard-hook-destroys-dead-keys

I will post PR in case of solving that. So far no success.

dail8859 commented 4 years ago

@fjcbs

A new DLL can be downloaded which should fix this issue. If there are no issues found I'll create another release soon.

fjcbs commented 4 years ago

@dail8859 sorry for the late reply. I tried your new 32bit dll in Notepad++ v7.8.3 and the problem is solved.

Thank you for your effort.

Please note that the OnScreenKeyboard alters the behavior of some keys (notably shift+key) and I couldn't test with it like @ikeblaster did.

dail8859 commented 4 years ago

@fjcbs Thanks. A new release will be available in the Plugin Adim in the next release of Notepad++