New ALT + ... shortcuts, in the FIND dialog, for default ENGLISH language !



  • Hi All,

    As a reply to the post of Ye Miao,

    https://notepad-plus-plus.org/community/topic/10941/notepad-6-8-8-released/12

    I had a look to the default ( English ) shorcuts, of the Find dialog and I noticed three annoying problems :

    • Some options or buttons have not any shortcut ( ALT + … ) defined yet

    • Most of the entry fields do not have a shortcut, too

    • Some options share the same shortcut as, for instance, the options Wrap around and Down which, both use the ALT + D shortcut


    So, I did numerous tests to clarify this situation and I’ve been able to find out some rules, about the shortcuts of the Find dialog :

    • If a same shortcut is used for two, or more, items, it does NOT work at all, when the Find dialog is opened !

    • Some shortcuts are effective, in their OWN tab only, as some others seems to work, independently, of the active tab ( Find, Replace, Find in Files or Mark tab )

    • When you hit one the 26 shortcuts ( ALT + Letter ), they work, both, in uppercase or lowercase states ( So the useless shortcut ALT + SHIFT + Letter would work, too ! )

    • If you need to hit the Shift key to write, with your keyboard, a non-letter character, then, the right shortcut is, necessary, ALT + SHIFT + this non-letter character. Note that the Caps Lock key is effective, too, when using ALT + non-letter shortcuts !


    Then, for the English default language, I built a NEW shortcut’s map, of the Find dialog, that I inserted into the Find node of the …\localization\english_customizable.xml file. Here are, below, the main rules that I followed :

    • I used ALT Letter shortcuts, as much as possible ( Only, the ALT + Z shortcut is absent )

    • Sometimes, to get the right shortcut, I, slightly, changed the text of the item ( For instance, Mark all instead of Find all, in the Mark tab )

    • Sometimes, I cheated a bit. For instance, the item Replace all in all Opened documents, in the Replace tab, has been changed into Replace all in all 0pened documents ( Digit 0 replace letter O, at the beginning of the word Opened ! )

    • I used Non-letter shortcuts, for the 4 entry fields ( Find What, Replace with, Filters and Directory ). I, finally, chose the four characters : ,, ., ; and '

      • Which don’t perturb, too much, the reading of the entry’s names

      • Which can be easily typed, with, both, standard American and English keyboards. Refer to the to links, below :

    http://ascii-table.com/keyboard.php/103P-1

    http://ascii-table.com/keyboard.php/166

    In order to look your mother keyboard, just click on the appropriate number, in the world keyboards list, at the address :

    http://ascii-table.com/keyboards.php


    IMPORTANT :

    You may, as well, use this method for completely customize, the Find dialog, in your mother language, too ! Follow the few steps below :

    • First of all, backup your present nativeLang.xml file, located in the Notepad++ directory ( Just in case of problems !! )

    • Re-build your mother .xml file, following these rules :

      • Use any shortcut ONCE, only

      • Modify the text of the item, if necessary, in order to get the right shortcut

      • Add the string &, before the chosen character, for shortcut ( For instance, the text “This is an e&xample” => the ALT + X shortcut )

      • Replace all the Find node, in your mother .XML file, under the localization folder, by your new version and save it

    • Close Notepad++

    • Delete the present nativeLang.xml file, in the same directory than Notepad++ ( VERY important )

    • Re-start Notepad++

    • Select the menu option Settings - Preferences… - General

    • Choose your language

    • Click on the Close button

    Immediately, Notepad++, copy your mother .xml file ( stored in the localization folder) as a nativeLang.xml file, located in the same folder, than Notepad++.exe

    • Open the Find dialog and just test !

    Applied to the default English language, here are, below, in a table, the different shortcuts, listed in alphabetic order, that I chose :

    •-----------------------•--------•-------------------------------------------------------------------•-------•---------•---------•
    |   Concerned tabs of   |  Item  |   NEW Entries, of the Find node, in "english_customizable.xml"    | ALT + |  Text   | Own tab |
    |    the FIND dialog    |  Type  |   ( and "NativeLang.xml" ), which have a NEW defined shortcut     | Char. | changed |  ONLY   |
    •-----------------------•--------•-------------------------------------------------------------------•-------•---------•---------•
    | General               | Field  | <Item id="1620" name="Find what:&amp;,"/>                         |   ,   |   Yes   |         |
    | Replace/Find in Files | Field  | <Item id="1611" name="Replace with:&amp;."/>                      |   .   |   Yes   |   Yes   |
    | Find in Files         | Field  | <Item id="1654" name="Filters&amp;;:"/>                           |   ;   |   Yes   |   Yes   |
    | Find in Files         | Field  | <Item id="1655" name="Directory&amp;':"/>                         |   '   |   Yes   |   Yes   |
    •-----------------------•--------•-------------------------------------------------------------------•-------•---------•---------• 
    | Replace               | Button | <Item id="1635" name="Replace All in All &amp;0pened Documents"/> |   0   |   Yes   |   Yes   |
    | Replace               | Button | <Item id="1609" name="Replace &amp;All"/>                         |   A   |         |   Yes   |
    | Find in Files         | Option | <Item id="1658" name="In all su&amp;b-folders"/>                  |   B   |         |         |
    | Search                | Button | <Item id="1614" name="&amp;Count"/>                               |   C   |         |   Yes   |
    | General               | Option | <Item id="1613" name="&amp;Down"/>                                |   D   |         |         |
    | General               | Option | <Item id="1626" name="&amp;Extended (\n, \r, \t, \0, \x...)"/>    |   E   |         |         |
    | Search / Replace      | Button | <Item id="1" name="&amp;Find Next"/>                              |   F   |         |         |
    | Mark                  | Option | <Item id="1618" name="Pur&amp;ge before each search"/>            |   G   |   Yes   |         |
    | Find in files         | Option | <Item id="1659" name="In &amp;hidden folders"/>                   |   H   |         |         |
    | Replace / Mark        | Option | <Item id="1632" name="&amp;In selection"/>                        |   I   |         |         |
    | Find in files         | Option | <Item id="1661" name=" &amp;Join current doc. path"/>             |   J   |   Yes   |         |
    | Mark                  | Option | <Item id="1616" name="Mar&amp;k line"/>                           |   K   |         |         |
    | Find in Files         | Button | <Item id="1656" name="Search in Fi&amp;les"/>                     |   L   |   Yes   |         |
    | Mark                  | Button | <Item id="1615" name="&amp;Mark All"/>                            |   M   |   Yes   |   Yes   |
    | General               | Option | <Item id="1625" name="&amp;Normal"/>                              |   N   |         |         |
    | Search                | Button | <Item id="1636" name="Find All in All &amp;Opened Documents"/>    |   O   |         |   Yes   |
    | Find in Files         | Button | <Item id="1660" name="Re&amp;place in Files"/>                    |   P   |         |         |
    | General               | Option | <Item id="1703" name="D&amp;QT matches newline"/>                 |   Q   |   Yes   |         |
    | Replace               | Button | <Item id="1608" name="&amp;Replace"/>                             |   R   |         |   Yes   |
    | General               | Option | <Item id="1604" name="Match ca&amp;se"/>                          |   S   |         |         |
    | Search                | Button | <Item id="1641" name="Find All in Curren&amp;t Document"/>        |   T   |         |         |
    | General               | Option | <Item id="1612" name="&amp;Up"/>                                  |   U   |         |         |
    | Mark                  | Button | <Item id="1633" name="Remo&amp;ve"/>                              |   V   |   Yes   |   Yes   |
    | General               | Option | <Item id="1606" name="&amp;Wrap around"/>                         |   W   |         |         |
    | General               | Option | <Item id="1605" name="Regular e&amp;xpression"/>                  |   X   |         |         |
    | General               | Option | <Item id="1603" name="Match whole word onl&amp;y"/>               |   Y   |         |         |
    •-----------------------•--------•-------------------------------------------------------------------•-------•---------•---------•
    

    Notes :

    • In the fifth column, the mention Yes means that I slightly, modified the original text, of the Find dialog item, in order to get the right shorcut

    • In the sixth and last column, the mention Yes means that the associate shortcut works, on its own tab only !. For instance, the ALT + M shortcut, associated to the Mark All button, works, in the Mark tab, exclusively and the ALT+ C shortcut, associated to the Count button, works, in the Search tab, only !

    • The ALT + Z shortcut is not used

    • The three items, of the english_customizable.xml file, below, has been deleted ( obsolete items, from old N++ releases )

      <Item id=“1617” name=“Style found token”/>
      <Item id=“1623” name=“Transparency”/>
      <Item id=“1637” name=“Find in Files”/>


    Therefore, here is, below, the final Find node, to insert in the english_customizable.xml file, in replacement of the old one :

            <Find title="" titleFind="Find" titleReplace="Replace" titleFindInFiles="Find in Files" titleMark="Mark">
    
                <!-- Find Entries -->
    
                <Item id="1620" name="Find what &amp;,:"/>
                <Item id="1"    name="&amp;Find Next"/>
    
                <Item id="1614" name="&amp;Count"/>
    
                <Item id="1636" name="Find All in All &amp;Opened Documents"/>
                <Item id="1641" name="Find All in Curren&amp;t Document"/>
    
                <Item id="1603" name="Match whole word onl&amp;y"/>
                <Item id="1604" name="Match ca&amp;se"/>
                <Item id="1606" name="&amp;Wrap around"/>
    
                <Item id="2"    name="Close"/>
    
                <Item id="1624" name="Search mode"/>
                <Item id="1625" name="&amp;Normal"/>
                <Item id="1626" name="&amp;Extended (\n, \r, \t, \0, \x...)"/>
                <Item id="1605" name="Regular e&amp;xpression"/>
                <Item id="1703" name="D&amp;qt = Any char."/>
    
                <Item id="1621" name="Direction"/>
                <Item id="1612" name="&amp;Up"/>
                <Item id="1613" name="&amp;Down"/>
    
                <Item id="1686" name="Transparency"/>
                <Item id="1687" name="On losing focus"/>
                <Item id="1688" name="Always"/>
    
                <!-- Additional Replace Entries -->
    
                <Item id="1611" name="Replace with &amp;.:"/>
                <Item id="1608" name="&amp;Replace"/>
    
                <Item id="1632" name="&amp;In selection"/>
                <Item id="1609" name="Replace &amp;All"/>
                <Item id="1635" name="Replace All in All &amp;0pened Documents"/>
    
                <!-- Additional Find in Files Entries -->
    
                <Item id="1656" name="Search in Fi&amp;les"/>
                <Item id="1660" name="Re&amp;place in Files"/>
    
                <Item id="1654" name="Filters &amp;;:"/>
                <Item id="1655" name="Directory &amp;':"/>
    
                <Item id="1661" name=" &amp;Join current doc. path"/>
                <Item id="1658" name="In all su&amp;b-folders"/>
                <Item id="1659" name="In &amp;hidden folders"/>
    
                <!-- Additional Mark Entries -->
    
                <Item id="1615" name="&amp;Mark All"/>
                <Item id="1633" name="Remo&amp;ve"/>
    
                <Item id="1616" name="Mar&amp;k line"/>
                <Item id="1618" name="Pur&amp;ge before each search"/>
    
            </Find>
    

    As said above, we, then, have :

    • To save this new english_customizable.xml file, again

    • To close Notepad++

    • To delete the present nativeLang.xml file,( usually, in the same directory than Notepad++ )

    • To re-start Notepad++

    • To select the menu option Settings - Preferences… - General

    • To choose the English (customizable) language

    • To click on the Close button

    Immediately, Notepad++, copy the English_customizable file ( stored in the localization folder) as a nativeLang.xml file, located in the same folder than Notepad++.exe

    Best Regards,

    guy038

    P.S. :

    Seemingly, this post is locked, by now and cannot be modified by everyone else than me :-((

    So, on 12/17/2016, I just report, a Scott’s weird observation, that I received by mail, relative to the displaying of two options Up and Down !

    Let’s supposed that you select the Down direction in the Find dialog, and that, you switch, by mistake, to the Find in Files or the Mark tab and, finally, select the Up direction, with the Alt + U shortcut. Then, while switching back to the Find dialog, the both directions are selected !?

    This strange behaviour occurs, also, if you select, first, the Up direction and select, afterwards, in the Find in Files or in the Mark tab, the Down direction !


Log in to reply