• Login
sketchucation logo sketchucation
  • Login
โ„น๏ธ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Does anyone know of a Ruby that saves your shortcuts

Scheduled Pinned Locked Moved Developers' Forum
17 Posts 10 Posters 800 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.
  • Z Offline
    zzm
    last edited by 4 Aug 2009, 01:27

    I have been wishing SketchUp would fix the bug that doesn't let you save your shortcuts. I know that you can save a .dat file of your shortcuts, but I can never get it to work when I import it. Has any made a ruby that saves shortcuts? that would be awesome

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dave R
      last edited by 4 Aug 2009, 01:50

      I haven't had any problems with keyboard shortcuts being saved with version 7. I've also not had any trouble with exporting or importing the DAT file between computers. There is a plugin that will show a list of the shortcuts you have assigned. Would that do it?

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chris Fullmer
        last edited by 4 Aug 2009, 01:59

        Yeah, the .dat file system should be working properly. I recall there being a few issues with something about it, but I thought it was all sorted out. But even those "issues" seemed to be minor annoyances, just making the user set values 2 times once in a while. Is it something that has happened repeatedly? You might try it out again if not.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zzm
          last edited by 4 Aug 2009, 02:14

          Well, I guess you are right. I could have sworn that it didn't work. So I reset all my short cuts and imported it and .... well it worked. I do remember it not working, but your post got me to have faith that it was working again- thanks.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dave R
            last edited by 4 Aug 2009, 02:30

            There were issues with a couple of shortcuts in V6 but they were fixed in version 7.

            Etaoin Shrdlu

            %

            (THERE'S NO PLACE LIKE)

            G28 X0.0 Y0.0 Z0.0

            M30

            %

            1 Reply Last reply Reply Quote 0
            • M Offline
              MartinRinehart
              last edited by 4 Aug 2009, 15:08

              Saving shortcuts mostly works. In my tutorial, I put up the occasional red box, mostly warning of stupid human traps but sometimes warning of SU issues. Scroll down a bit from the following link for the shortcuts issues box.

              Begin by reading the para immediately above the box, for perspective.

              Link Preview Image
              Martinrinehart.com

              favicon

              (www.martinrinehart.com)

              Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

              1 Reply Last reply Reply Quote 0
              • B Offline
                bagatelo
                last edited by 4 Aug 2009, 15:42

                Never set in sketchup shurtcuts that have going to conflit with standart shurtcuts, because it make lost configuration when you reimport preferences.dat in another computer who have standart configaration. Betwen new and old (standart) configuration table shurtcuts, sketchup always chose standart configuration.

                While the cat's away, the mice will play

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jackson
                  last edited by 6 Aug 2009, 08:50

                  Yep SU's hotkey import and export function is still crock- as Bagatelo says, it'll import and export 90% of your hotkeys, but when it clashes with SU's defaults it lets them win. ๐Ÿ˜ก

                  ... and I can't believe "Make component" still gets a default hotkey, but not "Make Group". No wonder so many SU users don't understand the difference between their uses.

                  Jackson

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Chris Fullmer
                    last edited by 6 Aug 2009, 08:51

                    Yeah, that is one I set up always right away. G for component, and ctrl-G for group.

                    Chris

                    Lately you've been tan, suspicious for the winter.
                    All my Plugins I've written

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 6 Aug 2009, 08:55

                      Ctrl+Shift+V ought to be standard as well.

                      Thomas Thomassen โ€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        Jackson
                        last edited by 6 Aug 2009, 09:09

                        @chris fullmer said:

                        G for component

                        FAIL!

                        ๐Ÿ˜‰ ๐Ÿ˜„

                        I actually use G for Make Group and still use the right-click context menu for making components. ๐Ÿ˜• It's funny how I can't imagine working in SU without hotkeys and yet there's still plenty of tools which I access the loooooong way round.

                        Jackson

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          JClements
                          last edited by 6 Aug 2009, 14:09

                          Since SU has been so innovative in the past you'd think they would have implemented voice recognition so you could assign verbal commands as shortcuts. ๐Ÿ˜Ž

                          It would be a little noisy in an office environment ๐Ÿ˜› , but would be fast and freeup unecessary keystrokes.

                          John | Illustrator | Beaverton, Oregon

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            thomthom
                            last edited by 6 Aug 2009, 14:15

                            Think that is built into Vista and Windows7...

                            Thomas Thomassen โ€” SketchUp Monkey & Coding addict
                            List of my plugins and link to the CookieWare fund

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              Chris Fullmer
                              last edited by 6 Aug 2009, 16:23

                              @jackson said:

                              @chris fullmer said:

                              G for component
                              FAIL!

                              I agree! But I decided with this last release of SU to leave all the default shortcuts alone so that I could use everyone else's SU when I was showing them the software. And G is the default key for make component. I used to use it for make Group, and ctrl-G was make component.

                              I'm realizing that I didn't follow my plan very well though, because some of their shortcuts are just stupid, and I changed them. I am thinking of O for orbit.....that is what the scroll wheel is for. O is for offset! So I've changed that default, and a few others. Oh well, I tried ๐Ÿ˜„

                              Chris

                              Lately you've been tan, suspicious for the winter.
                              All my Plugins I've written

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                Jackson
                                last edited by 6 Aug 2009, 18:22

                                LOL, yep I knew why you had G for component, it just made me chuckle. Like Ralph in the Simpsons: "An F in English? That's unpossible!"

                                Most of my hotkeys are acronymic:

                                S - Select
                                D - Deselect
                                L - Line
                                A - Arc
                                M - Move
                                C - Circle
                                F - Follow me
                                E - Eraser
                                H - Hide
                                U - Unhide All
                                G - Group
                                R - Rotate
                                O - Offset
                                X - eXplode

                                After that it becomes a bit cryptic, but there's still an obscure logic:

                                K - Konstruction lines (sic)
                                J - Erase construction lines (because it's adjacent to K)
                                Shift+H - Toggle hide/unhide other geometry (other than components)
                                Ctrl+M - Monochrome render
                                Ctrl+B - Textured render (no logic to that)
                                Q - PushPull. Simply because it's close to hand for my left hand.

                                I really should assign a lot more hotkeys, but switching between SU, Autocad, PS and 3DS Max hotkeys already has my fingers tangled like spaghetti. ๐Ÿ˜•

                                Jackson

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  RickW
                                  last edited by 6 Aug 2009, 19:09

                                  If you rename the .dat file from the default name to something like "shortcuts.dat", you have better success in importing shortcuts and overwriting the SU defaults, at least in my past experience. That could be related to the SU6 bugs that reportedly got fixed in SU7. I'll see if I can do a test on that here sometime soon...

                                  RickW
                                  [www.smustard.com](http://www.smustard.com)

                                  1 Reply Last reply Reply Quote 0
                                  • TIGT Offline
                                    TIG Moderator
                                    last edited by 7 Aug 2009, 11:38

                                    Simply exporting them to file - say 'myshortcuts.dat' makes a list as a text file thus.

                                    [Accelerators]
                                    Count=64
                                    0 0 0 Space selectSelectionTool:
                                    0 0 0 L selectLineTool:
                                    0 0 0 E selectEraseTool:
                                    0 0 0 C selectCircleTool:
                                    0 0 0 A selectArcTool:
                                    0 0 0 M selectMoveTool:
                                    ...

                                    The 0 0 0 fields represents modifier keys Ctrl/Alt/Shift, so

                                    0 0 0 H editHide:
                                    0 0 1 H Edit/Unhide/All ###shift

                                    This is used to Import your setting in the Preferences window.

                                    To ensure that they over-write any pre-existing ones you really need to edit the Windows Registry [ ๐Ÿค“ - be verycareful!]...
                                    HKEY_CURRENT_USER\Software\Google\Sketchup7\Settings Num_Shortcuts = REG_DWORD = 64 [or total of list length] Shortcut_1 = REG_SZ = "0 0 0 Space selectSelectionTool:" Shortcut_2 = REG_SZ = "0 0 0 L selectLineTool:"
                                    etc...
                                    You would 'empty' the 'Settings' prior to re-importing new ones ?

                                    Don't try this unless you know what you are doing... else= ๐Ÿ˜ฎ

                                    If you did then you could [with SUp closed] use a batch file to clear the Registry's '...\Settings' entries and then use those saved in the 'myshortcuts.dat' etc to remake those entries to suit...

                                    An alternative way to get a list of shortcuts is using the Ruby Console command:
                                    myshortcuts_array=Sketchup.get_shortcuts
                                    which returns an array of tab delimited shortcuts - e.g.
                                    ["Ctrl+A\tEdit/Select All", "Ctrl+C\tEdit/Copy", ...]
                                    You could manipulate each entry in that array and puts it into an external file [ myshortcuts_file="...\\myshortcuts.dat" ?] - this is equivalent to Exporting your current shortcut settings from Preferences - e.g. "Ctrl+A\tEdit/Select All" >>becomes***>> "1 0 0 A Edit/Select All"


                                    
                                    ###becomes 'simplied' - the testing and pattern matching is 'cod' here == it's NOT real code !
                                    text=myshortcuts_array[i]
                                    ctrl = "1 " if text.includes "Ctrl" else ctrl = "0 "
                                    alt = "1 " if text.includes "Alt" else alt = "0 "
                                    shift = "1 " if text.includes "Shift" else shift = "0 "
                                    key = text.split("+")[1].split("\t")[0]
                                    command = " " + text.split("+")[1].split("\t")[1]
                                    line = ctrl+alt+shift+key+command
                                    myshortcuts_file.puts(line)
                                    ###
                                    
                                    

                                    You could make the script auto-run on close and always keep a list of your current shortcuts ? You could then reimport them as desired using Preferences/Import or using a Registry batch-file lash-up...

                                    Hope there're a few ideas there...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • 1 / 1
                                    1 / 1
                                    • First post
                                      3/17
                                      Last post
                                    Buy SketchPlus
                                    Buy SUbD
                                    Buy WrapR
                                    Buy eBook
                                    Buy Modelur
                                    Buy Vertex Tools
                                    Buy SketchCuisine
                                    Buy FormFonts

                                    Advertisement