Request for review: 7144063: [macosx] Swing JMenu mnemonic doesn't work; hint misleading; cross symbol typed

Artem Ananiev artem.ananiev at
Fri Feb 24 14:20:41 PST 2012

On 2/24/2012 5:19 AM, Alexander Zuev wrote:
> Hello,
> the new version of webrev can be found here:
> It also includes the fix for "push-to-enter feature not working on
> Russian locale (and any other locale which has decimal delimeter other
> than '.')" - thanks Leonid for crafting the solution.

What I see is that for the Russia locale, getOSXMajorVersion() will now 
always return 0 as you only check for "." as the third character. Hence, 
condifion "getOSXMajorVersion() < 107" will always be true.



> Please consider reviewing this fix if possible.
> With best regards,
> Alexander Zuev
> On 2/17/12 22:09, Leonid Romanov wrote:
>> Well, I've investigated this issue a bit. To begin with,
>> getOSXMajorVersion() doesn't work with Russian locale. Basically, this
>> function converts OS version represented as a string, for example,
>> "10.7", into a double value. The reason why it fails with Russian
>> locale is because Russian locale uses "," as a decimal separator.
>> On 17.02.2012, at 21:47, Leonid Romanov wrote:
>>> Another thing to note is that we autorepeat pressed key even when
>>> press-and-hold popup is being displayed. This not how it works in
>>> native apps: if you press and hold a key in TextEdit, you'll
>>> immediately get press-and-hold popup
>>> and there won't be any autorepeats.
>>> On 17.02.2012, at 21:28, Scott Kovatch wrote:
>>>> I haven't applied your patch, but I noticed this too. Looks like we
>>>> need another bug for that.
>>>> The right arrow 'works' in that the cursor gets moved ahead one
>>>> character, but then the input method immediately deletes the
>>>> character and replaces it with the new candidate character.
>>>> -- Scott
>>>> On Feb 17, 2012, at 8:55 AM, Alexander Zuev wrote:
>>>>> Thanks Leonid,
>>>>> with this option it works - kind of strange - but the same way with
>>>>> or without my fix. It is possible to
>>>>> select variant from popup using mouse and numbers and with arrows -
>>>>> that's a little bit different
>>>>> story - for some reason left arrow (but not right one) being also
>>>>> translated to the TextArea so cursor
>>>>> starts moving and we will have that letter inserted in the wrong
>>>>> place.
>>>>> However this is not being affected by my fix - it works the same
>>>>> way with or without it.
>>>>> With best regards,
>>>>> Alex
>>>>> On 2/17/12 16:13, Leonid Romanov wrote:
>>>>>> Try this in terminal window:
>>>>>> defaults write -g ApplePressAndHoldEnabled -bool true
>>>>>> On 17.02.2012, at 17:54, Alexander Zuev wrote:
>>>>>>> On 2/16/12 19:15, Mike Swingler wrote:
>>>>>>>> One more to try: "press-and-hold" in Lion: if you hold down the
>>>>>>>> "e" key, and then use the mouse, arrow keys, or number keys to
>>>>>>>> select the variant.
>>>>>>> Looks like i need a step-by-step instruction here - i were unable
>>>>>>> to do it in TextEdit app on 10.7.3 machine with any language that
>>>>>>> has variants of 'e' letter. Once i hold down the e it starts
>>>>>>> autorepeating. Moving mouse or using arrow keys do not help much.
>>>>>>> Any option i have to turn on for that?
>>>>>>> With best regards,
>>>>>>> Alex

More information about the macosx-port-dev mailing list