Closed Bug 422888 Opened 16 years ago Closed 16 years ago

Cannot change the inputting mode by shortcut keys of AquaSKK without non-needed char inputting

Categories

(Core :: Widget: Cocoa, defect, P2)

x86
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: masayuki, Assigned: masayuki)

Details

(Keywords: intl)

Attachments

(1 file, 3 obsolete files)

Attached patch Patch v1.0 (obsolete) — Splinter Review
AquaSKK is an open source IME of Japanese. That input modes can change L/Shift+L/Ctrl+J/Q/Ctrl+Q. However, we use L/Shift+L/Q, the input mode is changed but the characters are inputted (i.e., l/L/q).

Probably, interpretKeyEvents sent the keyDown events to IME, and IMEs calling insertText for inputting the characters. However, AquaSKK eats the keyDown event if that is above short-cut keys. But then, we fire the non-needed keypress event ourselves. So, after we call interpretKeyEvents but insertText is not called, we should not fire the keypress event if the key combination is a normal character inputting event.
Flags: blocking1.9?
Attachment #309371 - Flags: review?(joshmoz)
Assignee: joshmoz → masayuki
Status: NEW → ASSIGNED
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Comment on attachment 309371 [details] [diff] [review]
Patch v1.0

+    // If we called interpretKeyEventsCalled and this event is inputting
+    // character event, insertText should be called by interpretKeyEventsCalled.
+    // So, this key event was eaten by IME or something. Then, we should not
+    // fire key press event.

This comment needs to be cleaned up a bit, perhaps like this:

// If we called interpretKeyEvents and this isn't normal character input
// then IME probably ate the event for some reason. We do not want to
// send a key press event in that case.

This is an area of IME I am not very familiar with, have roc check the logic of IsNormalCharInputtingEvent.
Attachment #309371 - Flags: review?(joshmoz) → review+
Attached patch Patch v1.0.1 (obsolete) — Splinter Review
Thank you Josh.

Only updating the comment. (see attachment 309372 [details] [diff] [review] for -u8pw)
Attachment #309371 - Attachment is obsolete: true
Attachment #310023 - Flags: superreview?(roc)
Attachment #310023 - Flags: superreview?(roc) → superreview?(pavlov)
Attachment #310023 - Flags: superreview?(pavlov) → superreview?(vladimir)
Comment on attachment 310023 [details] [diff] [review]
Patch v1.0.1


>+    // If we called interpretKeyEvents and this isn't normal character input
>+    // then IME probably ate the event for some reason. We do not want to
>+    // send a key press event in that case.
>+    if (!interpretKeyEventsCalled || !IsNormalCharInputtingEvent(geckoEvent)) {
>+      if (mKeyDownHandled)
>+        geckoEvent.flags |= NS_EVENT_FLAG_NO_DEFAULT;

Shouldn't this be || IsNormalCharInp... not !IsNormalChar.. ?
(In reply to comment #0)
> So, after we call interpretKeyEvents but insertText
> is not called, we should not fire the keypress event if the key combination is
> a normal character inputting event.

Oh, I missed this comment..

maybe if (!(interpretKeyEventsCalled && IsNormalCharInputtingEvent)) to clarify the logic, then?
Attached patch Patch v1.0.2Splinter Review
Attachment #309372 - Attachment is obsolete: true
Attachment #310023 - Attachment is obsolete: true
Attachment #312531 - Flags: superreview?(vladimir)
Attachment #310023 - Flags: superreview?(vladimir)
Attachment #312531 - Flags: superreview?(vladimir) → superreview+
checked-in, thanks.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: