Page MenuHome

Number input advanced mode is not working in JP keyboard
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: 67EF:CF ATI Technologies Inc. 4.5.13559 Core Profile Context 26.20.12028.2

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: rB77d23b0bd76f
Worked: (optional)

Short description of error
Number input advanced mode is not working in JP keyboard.

Exact steps for others to reproduce the error
In any transformation, before you type a numeric value, press the equal key (=) in your keyboard enter advanced mode.
But it does not work in JP keyboard. It seems to be involved that you need to hold shift to input = in JP keyboard.

Event Timeline

Sebastian Parborg (zeddb) changed the task status from Needs Triage to Needs Information from User.Mar 24 2020, 11:55 AM

I have a Swedish keyboard layout where you also have to hold shift to be able to get into advanced mode and it seems to work fine for me.
This might be because I'm using Linux though... So this might be a Windows specific bug.

Exactly what does it do when you type =? It just eats the input or what?

On a JP keyboard - and = are same key. When press hold plus -, it inputs -.

Just tested on Windows with a German keyboard (= is Shift + 0 there), but couldn't recreate it either.

You can check what is output to the console when entering = after starting Blender with --debug-handlers.

Another thing, do you have IME activated? It could be that the IME interferes, even if the window doesn't actually become visible. IIRC it's a separate window for the OS, and there are known issues with modifier keys not working properly with window activation.

I also did a double check with linux and switched to the Japanese "OADG109A" layout and it still seems to work fine if I hit Shift + -.

I'm guessing that you are also using this OADG 109A layout?
https://en.wikipedia.org/wiki/Language_input_keys#Keys_for_Japanese_Keyboards

I'm using OADG 109A layout. On Windows, it is displayed as 日本語キーボード(106/109 キー).

This is event log when shift + - is pressed. IME is not activated.

wm_event_do_handlers: Handling event
wmEvent type:103 / G, val:2 / RELEASE,

shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
mouse:(1044,701), ascii:' ', utf8:'', keymap_idname:(null), pointer:0000028166F8C658

wm_event_do_handlers: Handling event
wmEvent type:217 / LEFT_SHIFT, val:1 / PRESS,

shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0,
mouse:(1044,701), ascii:' ', utf8:'', keymap_idname:(null), pointer:0000028166F8E278

wm_event_do_handlers: Handling event
wmEvent type:230 / MINUS, val:1 / PRESS,

shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0,
mouse:(1044,701), ascii:'=', utf8:'=', keymap_idname:(null), pointer:0000028166F8DA98

wm_event_do_handlers: Handling event
wmEvent type:230 / MINUS, val:2 / RELEASE,

shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0,
mouse:(1044,701), ascii:' ', utf8:'', keymap_idname:(null), pointer:0000028166F8D618

On US layout, works fine.

Hmm at first glance, it seems like this should be correct if I compare the output from my Swedish layout:

wm_event_do_handlers: Handling event
wmEvent  type:216 / RIGHT_SHIFT, val:1 / PRESS,
         shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(291,614), ascii:'', utf8:'', pointer:0x7fb50ca69408

wm_event_do_handlers: Handling event
wmEvent  type:48 / ZERO, val:1 / PRESS,
         shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(291,614), ascii:'=', utf8:'=', pointer:0x7fb50ca69408

wm_event_do_handlers: Handling event
wmEvent  type:48 / ZERO, val:2 / RELEASE,
         shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(291,614), ascii:'', utf8:'', pointer:0x7fb50ca69408

wm_event_do_handlers: Handling event
wmEvent  type:216 / RIGHT_SHIFT, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(291,614), ascii:'', utf8:'', pointer:0x7fb50ca69408

But if I switch to the Japanese layout I get this:

wm_event_do_handlers: Handling event
wmEvent  type:217 / LEFT_SHIFT, val:1 / PRESS,
         shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(235,506), ascii:'', utf8:'', pointer:0x7f5911ee0708

wm_event_do_handlers: Handling event
wmEvent  type:234 / EQUAL, val:1 / PRESS,
         shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(235,506), ascii:'=', utf8:'=', pointer:0x7f5911ee0708

wm_event_do_handlers: Handling event
wmEvent  type:234 / EQUAL, val:2 / RELEASE,
         shift:1, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(235,506), ascii:'', utf8:'', pointer:0x7f5911ee0708

wm_event_do_handlers: Handling event
wmEvent  type:217 / LEFT_SHIFT, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(235,506), ascii:'', utf8:'', pointer:0x7f5911ee0708

wm_event_do_handlers: Handling event
wmEvent  type:230 / MINUS, val:1 / PRESS,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, is_repeat:0,
         mouse:(235,506), ascii:'-', utf8:'-', pointer:0x7f5911ee0708

As you can see mine does not report the key as "MINUS" when holding shift but instead says that it is "EQUAL".
Perhaps the input is taken as "MINUS" for you then even if you hold shift?
Can you see if you can negate the number input in basic mode by doing shift+-?

Input can be negated in basic mode by doing shift+-.

Sebastian Parborg (zeddb) changed the task status from Needs Information from User to Needs Developer to Reproduce.Mar 24 2020, 5:46 PM

I'll see if I can spot the issue in the code if it is a simple one.
But we will probably need someone that experiences this issue to fix it, as we can't really test out if it works or not ourselves currently.

@Kinouti Takahiro (dskjal) Can you try this patch and see if it makes you able to go into advanced mode?
(It should also remove the ability to negate in basic mode too...)

I also noticed something in the code:
You can also enter advanced mode with *. So I guess that one should work for you?

'*' works fine. Thanks!

I've committed a fix. You should now be able to use both = and * in the next build.