Change shortcut for zoom in / out - "Num +" and mouse wheel not available on laptop
-
@kofaysi said:
The normal plus symbol shortcut is not available in the shortcut mapper
Maybe it is, it depends on your keyboard locale. The key list in Notepad++'s shortcut mapper lies when it comes to the charcters at the end of the list (after the F12 key). All these characters are mapped to keyboard locale dependent keys which not necessarily show the same character on them like noted in the list.
Here is a mapping table for a german keyboard to the characters in Notepad++ shortcut mapper’s key list:
| Npp shortcut mapper | German Keyboard | | |---------+------------| | | solo | with SHIFT | |---------------------+---------+------------| | ~ | ö | Ö | | - | - | _ | | = | + | * | | [ | ß | ? | | ] | ´ (DK) | ` (DK) | | ; | ü | Ü | | ' | ä | Ä | | \ | ^ (DK) | ° | | , | , | ; | | . | . | : | | / | # | ' | | <> | < | > | (DK) marks so called dead keys.
Here is an image of a german keyboard:
If you figure out which key on a german keyboard corresponds to the
+
key on your keyboard (i.e. they share the same physical position) you can use the mapping table above to configure your shortcut. -
Wow. That would be GREAT to have a documentation in the new user manual being developed. Very clear, very understandable.
-
It would be even greater if we wouldn’t need such a documentation because Notepad++ shortcut mapper’s character list would be keyboard locale dependent. This could be achieved by filling the problematic characters into the character list by calls to the Win32 API
MapVirtualKey(vkCode, MAPVK_VK_TO_CHAR)
.This API (called in the above way) maps virtual key codes to character strings. The problematic keyboard keys should be the same all around the world, the table below shows their virtual key codes and the corresponding characters on a german keyboard.
| Virtual key codes (per keyboard row) | Characters on | | german keyboard |-------------------------------------------------------+------------------ | VK_OEM_5, VK_OEM_4, VK_OEM_6, | ^ ß ´ | VK_OEM_1, VK_OEM_PLUS, | ü + | VK_OEM_3, VK_OEM_7, VK_OEM_2, | ö ä # | VK_OEM_102, VK_OEM_COMMA, VK_OEM_PERIOD, VK_OEM_MINUS | < , . -
Since I’m not a C++ dev I can’t change the source code by myself to file a pull request. Maybe somebody more qualified can use the above concept to do that.
-
That would be GREAT to have a documentation in the new user manual being developed.
agreed, but please don’t push it too much.
we’ve been living with an outdated documentation for the past 5 years, and now that it is going to be set up as a new, community based one, please remember saturday night live’s “lowered expectations” series 😉it’s going to be very hard for all of us, including you as hopefully future contributor, to create a new manual which deals with the most relevant community topics of the past and present, but at least when it’s online we can say one or more of the following:
- cool, now i can copy paste from the manual part we wrote, instead of pasting from my personal, unsaved notepad++ tabs as before.
- damned, now we’ve written all that load of stuff, and this dude asks exactly the stuff that none of us has ever thought of.
- oh shit, i don’t even know where to begin with creating a manual, now i know why it was abandoned back in its days.
- etc. etc. etc
greetings.
-
No success: I switched through three languages (English, Czech, German). zoom out [ctrl + -] and zoom off [ctrl + =] works OK, but ctrl + + does nothing. M
-
What is your keyboard loacale? Which key on a german keyboard has the same physical position like the
+
key on your keyboard? -
The same as on your picture. I can write
zuiopü+
in one row.There is an exception I found: ctrl + + on the German locale keyboard switches the zoom off, if it has been zoomed out before. Other locales do nothing even in this case.
I had a chance to attach an external keyboard with a numpad and the combination of ctrl and the + symbol on the numpad worked as expected, zoom in. But using the + symbol on the same keyboard in combination with ctrl did nothing. M
-
You didn’t answer my question. Do you have a Czech keyboard? If yes, try to configure
CTRL+1
as your shortcut. -
I don’t know, I never though about the nationality of my keyboard. It might be English/Czech.
Mapping ctrl+1 to zoom in works. But I’m totally confused and scared. So, the mapping ignores the actual language local layout to which I switched and used English default layout always? How come ctrl + - worked on the German and Czech layout? – the minus symbols are located at different locations than on the English.
-
Some advices for the future. If you have a (computer) problem and ask for help you should follow these rules:
- Actually answer the questions you are asked for.
- Answer them as exact as possible (e.g. there is no “English/Czech” keyboard, keyboards are english or czech).
- Read the answers you got thoroughly, try to understand them and to exactly follow the requested steps. If you haven’t understood any detail ask a question about that special detail.
- Provide exact information (maybe as a step-by-step sequence) about what you did beyond that what you have been told to do.
If you would have followed only point 3., you would have solved your problem 4 days ago and I would have saved some time today which I spend to provide you further help.
Nevertheless, nice to hear that you were able to solve this issue.
-
I’m sorry, but your answer and the suggested new settings opened a totally new world for me which I didn’t expect: the keymapping is bound to a hardware equipment(?) and to an absolute location of the key on the keyboard:
- setting keymapping of zoom in to
ctrl+1
(as suggested above and for all the keypressing and layouts mentioned in this post) - pressing position
1
in English mapping, when keyboard mapping is Czech (switching input method) displays:+
which is absolutely correct - pressing the same position
ctrl+1
in Czech, German and English keyboard mapping makes the window zoom in, which is confusing, because I have pressedctrl+1
on the English mapping and at the same timectrl++
on the remapped Czech keyboard. The keymapping should be of relative position too, not an absolute position. - pressing shift + position
1
in English mapping, when keyboard mapping is Czech (switching input method) displays:1
which is also absolutely correct - pressing the same position
ctrl+shift+1
in Czech, German and English keyboard mapping does not make the window zoom in, which is confusing, because I have pressedctrl+1
on the remapped Czech keyboard and that should combination should zoom in. Again, the keymapping should be of relative position to the used input method, not an absolute position.
I still do not understand, why
ctrl++
mapping did not work in any of the mentioned keyboard layouts, previously. I’d love to havectrl++
and remap thectrl+1
back to style1.I have never considered the nationality or as you name it, the keyboard locale of my keyboards, which I used. How can I find it out, please? The keyboard locale meant the current language input method I switched to (e.g. by
WIN+spacebar
).The relative mapping of the keyboard always worked and keymapping was always relative to it.Note: Although my settings at https://notepad-plus-plus.org/community/ reads that I should be notified of new posts
Follow topics you create
andFollow topics that you reply to
, I’m not notified at all. I should expect an e-mail notification, shan’t I? - setting keymapping of zoom in to
-
I hope the concept will be changed and keymapping will be straightforward (and keyboard mapping dependent) so, it will not need such documentation obscurity. Notepad++ does not need such public shame and blame.
-
Here the table for the Brazilian Portuguese layout (ABNT2) based on dinkumoil’s work:
| | Pt/br Keyboard | | Npp shortcut mapper |---------+------------|--------------|--------------- | | | solo | with SHIFT | Virtual Key | KeyboardEvent | |---------------------+---------+------------|--------------|----------------| | ~ | ' | " | VK_OEM_3 | Backquote | | [ | ´ (DK) | ` (DK) | VK_OEM_4 | BracketLeft | | ] | [ | { | VK_OEM_6 | BracketRight | | ; | ç | Ç | VK_OEM_1 | Semicolon | | ' | ~ (DK) | ^ (DK) | VK_OEM_7 | Quote | | \ | ] | } | VK_OEM_5 | Backslash | | / | ; | : | VK_OEM_2 | Slash | | <> | \ | | | VK_OEM_102 | IntlBackslash | | Num . | Num , | DEL | VK_DELETE | NumpadDecimal | * | | Num . | | VK_ABNT_C2 | NumpadComma | | | / | ? | VK_ABNT_C1 | IntlRo | * Shortcuts using the Shift key don't work with the Numpad, are they being overridden by the driver?
As a result, by using this layout one cannot bind commands to the
/
andNum .
keys -
I added your post to the Keyboard Shortcut FAQ.
-
@PeterJones Much appreciated
A few links for better understanding or future reference in the event or of a dev wanting to take a chance.
https://w3c.github.io/uievents-code/
https://jsfiddle.net/v1gz5c5m/1/
https://github.com/Microsoft/node-native-keymap