From b7268373ff61c61f0e904de0aef7e9eab704005b Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Sat, 14 Jan 2023 10:03:54 +1100 Subject: Bug [#2374]. Fix character input bug where dotless 'i' and some other extended Latin characters could not be entered. The change also stops SCI_ASSIGNCMDKEY from working with these characters. --- cocoa/ScintillaCocoa.mm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cocoa') diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 0b1693f50..64ea4f874 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2228,6 +2228,10 @@ bool ScintillaCocoa::KeyboardInput(NSEvent *event) { // Handle each entry individually. Usually we only have one entry anyway. for (size_t i = 0; i < input.length; i++) { const UniChar originalKey = [input characterAtIndex: i]; + // Some Unicode extended Latin characters overlap the Keys enumeration so treat them + // only as and not as command keys. + if (originalKey >= static_cast(Keys::Down) && originalKey <= static_cast(Keys::Menu)) + continue; NSEventModifierFlags modifierFlags = event.modifierFlags; Keys key = KeyTranslate(originalKey, modifierFlags); -- cgit v1.2.3