zoom keys (shortcuts) 3,4,6 on numeric pad not working

Bug #167796 reported by Bug Importer on 2006-07-06
Affects Status Importance Assigned to Milestone

Bug Description

In ver 0.44 (windows) the keys 3,4,6 doesn't work on
numeric pad in right side ("Bloc Num"). They were very

Rwst (rwst) wrote :

confirmed on Linux

Bug Importer (bug-importer) wrote :

confirmed on win XP

Bug Importer (bug-importer) wrote :

Don't know the layout of the guy opening the bug report, but there is this
bug on french azerty keyboards.

Working :
5 (page view)
+ (zoom in)
- (zoom out)

other doesn't work at all.

special bahaviors : * (change to star object mode)

Numlock on or off :
if an object is selected : 2,4,6,8 move the object
5 zoom at the page size.

Bug Importer (bug-importer) wrote :

I forgett this :

If numlock is off, numpad suppr key remove object, if numlock is on, this
doesn't happen.

nightrow (jb-benoit) on 2007-12-15
Changed in inkscape:
status: New → Confirmed
prkos (prkos) wrote :

This is still an issue, what works is 5, +, - and *

If NumLock is off it expects to select object to lower or raise (corner numbers) or move and it works.

user (me-at-mail) wrote :

Only 5, +, -, *, arrows, home, end, pgup, pgdn works on numpad in windows xp/vista.

v1nce (vincent-pennec) wrote :

Linux 0.46 11 aug 2009 has this bug too

Aisano (info-ais-sanmarino) wrote :

I am using Inkscape 0.47 under Linux, and my impression is that the codes for the hotkeys are hard-coded in Inkscape. My keyboard layout is German/Germany, and the + and - keys for zoom-in/out do not work; however, I can use the "ß" and "'" keys (which are the +/- keys in the US-American layout). Also, Ctrl-Z does not perform an "undo" but Ctrl-Y does (the Y and Z keys in the German layout are swapped in comparison to US-American).

Given that Inkscape is i18d-ed it would be consequent to evaluate the character codes rather than the key codes.

jazzynico (jazzynico) on 2010-05-17
tags: added: shortcuts
jazzynico (jazzynico) wrote :

It should not be too hard to fix.
Adding keypads in the share/keys/default.xml file seems to work (tested with <bind key="KP_4" action="ZoomDrawing" />).

I'm investigating why the keypad keys are not currently used.

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.49
status: Confirmed → In Progress
jazzynico (jazzynico) wrote :

Partial fix committed in the trunk, revision 9688.

Keypad 1 (zoom 100%) and 3 (zoom to selection) now works correctly, but 2, 4 and 6 seem to be hard coded and don't work even when they are correctly set in the keys file.

@~suv. I think Aisano's bug (comment #8) is not related, and I can't reproduce the issue on Ubuntu and XP with a French keyboard. Are you affected by this bug too (assuming you're keyboard speaks German...)?

su_v (suv-lp) wrote :

> Are you affected by this bug too (assuming you're keyboard
> speaks German...)?

My keyboard speaks de_CH (slightly different from de_DE, but also a QWERTZ-layout), and I cannot reproduce what is described in comment #8: for me the shortcuts '-' and '+' zoom out/in as expected ('+' is 'Shift'+'1'), ctrl-z is 'Undo' and ctrl-y is 'Redo'.

(For testing, I restarted Inkscape after removing ~/.config/inkscape/keys/default.xml to make sure there are no overriding custom shortcuts: same results with Inkscape 0.47, 0.48 r9641 and 0.48+devel r9686 on OS X 10.5.8, X11/Xquartz 2.4.0, MacBookPro with de_CH keyboard layout, no numeric keypad)

jazzynico (jazzynico) wrote :

Thanks, ~suv!

Actually, keypad 2, 4 and 6 now work when the selector tool is NOT selected...

su_v (suv-lp) wrote :

With regard to comment #8:
> Given that Inkscape is i18d-ed it would be consequent
> to evaluate the character codes rather than the key codes.

Inkscape does _not_ evaluate keycodes - else changing the X11 keymap (keycode -> keysym) with xmodmap would have no effect:

a) Mac OS X Leopard+ users have to remap one (or optionally both) of the 'option/alt' keys under X11 to generate the 'Alt_L' (or 'Alt_R') keysym needed for Inkscape's shortcuts - menu access, alt-click and a lot of the shortcuts defined in 'keys/default.xml' (the Inkscape FAQ has more details). Some users also prefer to swap the keysyms of 'Ctrl' and 'Cmd' under X11 ('Cmd' is the default modifier under OS X).

b) With a de_CH keyboard layout on Mac OS X, the hard-coded keyboard shortcuts to rotate objects or nodes ([, ]) do not work because the 'Mode_switch' modifier is required to generate their keysyms (keynames). This modifier does not work in Inkscape's keyboard shortcuts (only for text input). After remapping two rarely used keys with xmodmap, I can now generate the keysyms for '[' and ']' without the 'option/alt' key ('Mode_switch') and rotating objects and nodes with keyboard shortcuts works flawlessly.

-> Inkscape does not read the keycodes under X11, it uses the keysyms (keynames) as defined in the keymap table of X11.

This applies to a) shortcuts that are defined in 'share/inkscape/keys/default.xml' as well as to b) internally hard-coded shortcuts that cannot be remapped by the user.

jazzynico (jazzynico) wrote :

Commenting case GDK_KP_2, GDK_KP_4 and GDK_KP_6 in select-context.cpp seems to fix the remaining issue (the selection can still be moved with the arrow keys or the keypad arrows with NumLock off).

While I'm at it, zoom prev. and zoom next shortcuts don't work with my French azery keyboard. They currently assigned to "grave" and "asciitilde", which is not very convenient... What about assigning them to KP_8 and KP_9?

su_v (suv-lp) wrote :

> What about assigning them to KP_8 and KP_9?

What about netbook and laptop users without numeric keypad? Aren't the difficulties with these two shortcuts on international keyboards tracked in bug #165755? AFAIK "grave" and "asciitilde" are very convenient on a standard US keyboard layout (to the left of the 'Z', easily used with the left hand while the right hand is free for the mouse or pen). I don't think we should change some of the current default shortcuts to accommodate other keyboard layouts [1] - IMHO working towards providing a number of alternative keymapping files for different languages would be a preferable solution.

[1] these two default shortcuts fail for me too, but I have them remapped in the user 'keys/default.xml' file.

jazzynico (jazzynico) wrote :

> What about netbook and laptop users without numeric keypad?

I'm currently working on adding Shift+<Num> binding for the different zooms shortcuts (Bug #181393).

> Aren't the difficulties with these two shortcuts on international keyboards tracked in bug #165755?

Yep, I totally forgot about this report ;)

> AFAIK "grave" and "asciitilde" are very convenient on a standard US keyboard layout

I don't plan to replace the existing shortcuts, but to add new ones to cover a wider range of keyboards with the default keys file.
Since KP_8 and KP_9 are available, don't interfere with existing features and shortcuts, and are very convenient (close to the other zoom keypad shortcuts), I feel it could be a very useful addition, even for querty users.

Providing alternative files for other keyboard is a good idea, but I thing we should try to fix the issues in the default file first (when possible).

Aisano (info-ais-sanmarino) wrote :

JazzyNico skribis:
>> I think Aisano's bug (comment #8) is not related...
O.k., so my problem seems to have a different cause. I had not used Inkscape since installing Ubuntu 10.04, so I just installed it (0.47) and tested again. There seems to be one change with respect to my earlier comment (8) about the German keyboard layout: Now Ctrl-Z no longer seems to have any effect (neiter "undo" nor "redo"). CTRL-Y still performs an "undo", "+" and "-" (plus/minus) do not do anything, and the two keys to the left of the "backspace" key (labelled "ß" resp. "'") perform "zoom out" and "zoom in", just as with US American layout.

Now I have a German keyboard layout but my system language is Esperanto. Could it be that Inkscape takes its keyboard layout not from the keyboard settings but from the language settings? That would explain a lot. The Esperanto keyboard layout (which I do not use, as I need German characters a lot) has the +, - and Z keys in the same place as the US American layout but has a "ŭ" in place of the Y.

This could be tested by switching the system language -- but today it is too late for me to endeavour that.

That is all I can say. I can live with that problem. I have never thought about it but people like me with an unusual keyboard-language combination might be a rarer species than I supposed.

ScislaC (scislac) wrote :

JazzyNico: Is this still "in progress"?

jazzynico (jazzynico) wrote :

@ScislaC: yes, I'm going to assign KP_8 and KP_9 to zoom prev and zoom next.
After that, I think we should close the report and open a new open (if not already done) to work on the alternative keyboard files.

jazzynico (jazzynico) wrote :

Fix committed, trunk revision 11537.

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico) on 2015-02-14
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers