Page MenuHome

Error PADPLUSKEY [ latin1 ]
Closed, ResolvedPublic

Description

System Information
Linux familia-pc 4.4.8-1-MANJARO #1 SMP PREEMPT Thu Apr 21 00:21:08 UTC 2016 x86_64 GNU/Linux

Blender Version
Broken: 2.77

Short description of error
[ PADPLUSKEY ] key does not work in the Latin American keyboard

Temporary solution
[ File: wm_event_system.c add line 2942 ]
+ case GHOST_kKeyUnknown: return PADPLUSKEY;

Revisions and Commits

Event Timeline

Daniel Rivera (Dr2d4) claimed this task.
Daniel Rivera (Dr2d4) raised the priority of this task from to 90.
Daniel Rivera (Dr2d4) updated the task description. (Show Details)
Daniel Rivera (Dr2d4) edited a custom field.
Bastien Montagne (mont29) lowered the priority of this task from 90 to 30.May 8 2016, 11:11 AM

Can’t confirm this here, switched to EN keyboard layout and still getting correct padplus event.

Note that Ghost converts XKey values to its own in convertXKey() (in GHOST_SystemX11.cpp), you'd rather want to put a print in this func so see which value you get when hitting padplus (x11 define: #define XK_KP_Add 0xffab).

Also, is padplus the only key affected? would expect you'd get same issue with padminus, etc., at least…

Daniel Rivera (Dr2d4) added a comment.EditedMay 9 2016, 1:47 AM

Thanks works well by assigning 0x002b the padplus however I think that it should be updated soon since blender loses functionality for the Spanish-speaking without this key

File: GHOST_SystemX11.cpp
+ #define XK_KP_Add 0x002b

Daniel Rivera (Dr2d4) added a comment.EditedMay 9 2016, 8:09 AM

Reviewing more detail I found that

On laptop with GNU/Linux and Latin American keyboard:

Emulated NumPad = False

PADPLUS = ERROR
PADMINUS = ERROR

Emulated NumPad = True

PADPLUS = ERROR
PADMINUS = CORRECT

There is something else going on here, related to your keyboard or (more likely) your Xorg keyboard settings somehow.

0x002b is Xorg keycode for XK_plus, i.e. the plus sign on main keyboard. So if you are getting that value when hitting the numpad plus key, something is wrong imho.

Never the less, GHOST handles the XK_minus but not the XK_plus code, not sure why, sounds suspicious to me too.

Hum… in fact, there is no support for XK_plus because in theory there is no keyboard layout with direct access to that key (it’s usually shift-equal).

Now, you mention pad emulation, does it mean you do not have any physical numpad? Also, please try with e.g. a livecd of the latest ubuntu distribution, this really feels like a bad mapping of your keyboard in your OS…

The same goes for ubuntu

And my keyboard layout is

Daniel Rivera (Dr2d4) added a comment.EditedMay 9 2016, 9:04 PM

The error is in that adds a:

File: GHOST_SystemX11.cpp : GMAP (type, XK_minus, GHOST_kKeyMinus);

but is not added on:

GXMap (type, XK_plus, GHOST_kKeyPlus);

so to activate the numeric keypad Pad Plus does not work on Latin keyboards

Info: keysymdef.h

/*
 * Latin 1
 * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
 * Byte 3 = 0
 */

#define XK_plus                          0x002b  /* U+002B PLUS SIGN */
#define XK_minus                         0x002d  /* U+002D HYPHEN-MINUS */

if you add XK_plus keyboard works properly with English and Latin American

Bastien Montagne (mont29) raised the priority of this task from 30 to Normal.May 9 2016, 9:49 PM

Aaaaaaaaaah! that explains a lot!

Those are not padplus/minus at all! those are 'just' plus/minus (padplus/padminus are numpad keys only).

So, didn’t know some keyboard layouts had direct access to plus key (without some modifier like shift), this changes things - guess we'll have to add support for GHOST_kKeyPlus then… Won't change anything to current state though, since this key does not exists for default QWERTY english layout, it won't be used in default keymaps - but at least you''l be able to add it to custom shortcuts.

Note that emulated numpad is something else, not sure how good this is supported by linux (that feature is supposed to generate actual numpad key events, but the way those virtual numpad keys are layed out is totally not tied to the 'regular' keyboard layout).