• Login
Community
  • Login

Change shortcut for zoom in / out - "Num +" and mouse wheel not available on laptop

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
shortcut keyshortcut mapperzoom
16 Posts 6 Posters 3.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    kofaysi
    last edited by PeterJones Mar 6, 2024, 3:43 PM May 27, 2019, 7:10 PM

    Dear users,

    I wish to change or remap the zoom in command to CTRL++ (not CTRL+NUM+). Using a laptop, no num+ or wheel is available for me. The normal plus symbol shortcut is not available in the shortcut mapper to remap the SCI_ZOOMIN command.

    I also miss other ASCII symbols to be available for mapping for Scintilla, such as _ [underscore], both parentheses, % [percent], curly brackets, : [colon],… Why is that?

    Note, the symbols <> [lower, greater] can be mapped together, they are listed on a single line.

    Thank you

    D 1 Reply Last reply May 27, 2019, 8:21 PM Reply Quote 0
    • D
      dinkumoil @kofaysi
      last edited by dinkumoil May 27, 2019, 8:37 PM May 27, 2019, 8:21 PM

      @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.

      A 1 Reply Last reply May 27, 2019, 10:23 PM Reply Quote 4
      • A
        Alan Kilborn @dinkumoil
        last edited by May 27, 2019, 10:23 PM

        @dinkumoil

        Wow. That would be GREAT to have a documentation in the new user manual being developed. Very clear, very understandable.

        D M 2 Replies Last reply May 27, 2019, 10:44 PM Reply Quote 3
        • D
          dinkumoil @Alan Kilborn
          last edited by May 27, 2019, 10:44 PM

          @Alan-Kilborn

          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.

          1 Reply Last reply Reply Quote 3
          • M
            Meta Chuh moderator @Alan Kilborn
            last edited by May 27, 2019, 11:29 PM

            @Alan-Kilborn

            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.

            1 Reply Last reply Reply Quote 2
            • K
              kofaysi
              last edited by May 31, 2019, 11:24 AM

              No success: I switched through three languages (English, Czech, German). zoom out [ctrl + -] and zoom off [ctrl + =] works OK, but ctrl + + does nothing. M

              D 1 Reply Last reply May 31, 2019, 11:40 AM Reply Quote 1
              • D
                dinkumoil @kofaysi
                last edited by May 31, 2019, 11:40 AM

                @kofaysi

                What is your keyboard loacale? Which key on a german keyboard has the same physical position like the + key on your keyboard?

                1 Reply Last reply Reply Quote 1
                • K
                  kofaysi
                  last edited by kofaysi May 31, 2019, 11:50 AM May 31, 2019, 11:50 AM

                  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

                  D 1 Reply Last reply May 31, 2019, 12:06 PM Reply Quote 0
                  • D
                    dinkumoil @kofaysi
                    last edited by May 31, 2019, 12:06 PM

                    @kofaysi

                    You didn’t answer my question. Do you have a Czech keyboard? If yes, try to configure CTRL+1 as your shortcut.

                    1 Reply Last reply Reply Quote 1
                    • K
                      kofaysi
                      last edited by kofaysi May 31, 2019, 12:31 PM May 31, 2019, 12:30 PM

                      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.

                      D 1 Reply Last reply May 31, 2019, 1:05 PM Reply Quote 2
                      • D
                        dinkumoil @kofaysi
                        last edited by dinkumoil May 31, 2019, 1:06 PM May 31, 2019, 1:05 PM

                        @kofaysi

                        Some advices for the future. If you have a (computer) problem and ask for help you should follow these rules:

                        1. Actually answer the questions you are asked for.
                        2. Answer them as exact as possible (e.g. there is no “English/Czech” keyboard, keyboards are english or czech).
                        3. 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.
                        4. 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.

                        1 Reply Last reply Reply Quote 2
                        • K
                          kofaysi
                          last edited by kofaysi May 31, 2019, 1:49 PM May 31, 2019, 1:47 PM

                          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 pressed ctrl+1 on the English mapping and at the same time ctrl++ 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 pressed ctrl+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 have ctrl++ and remap the ctrl+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 and Follow topics that you reply to, I’m not notified at all. I should expect an e-mail notification, shan’t I?

                          1 Reply Last reply Reply Quote 0
                          • K
                            kofaysi
                            last edited by May 31, 2019, 1:58 PM

                            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.

                            1 Reply Last reply Reply Quote 0
                            • notdodgeballN
                              notdodgeball
                              last edited by notdodgeball Feb 27, 2024, 12:41 PM Feb 27, 2024, 12:11 PM

                              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 / and Num . keys

                              PeterJonesP 1 Reply Last reply Feb 27, 2024, 2:02 PM Reply Quote 2
                              • PeterJonesP
                                PeterJones @notdodgeball
                                last edited by Feb 27, 2024, 2:02 PM

                                @notdodgeball ,

                                I added your post to the Keyboard Shortcut FAQ.

                                notdodgeballN 1 Reply Last reply Mar 6, 2024, 3:34 PM Reply Quote 0
                                • notdodgeballN
                                  notdodgeball @PeterJones
                                  last edited by Mar 6, 2024, 3:34 PM

                                  @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

                                  1 Reply Last reply Reply Quote 1
                                  • First post
                                    Last post
                                  The Community of users of the Notepad++ text editor.
                                  Powered by NodeBB | Contributors