sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    My Apple Keyboard VK_KEYS

    Scheduled Pinned Locked Moved Developers' Forum
    15 Posts 3 Posters 3.6k Views 3 Watching
    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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      When you hold down SHIFT and hit the option key... do you get VK_ALT ?

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        I tried that on my PC. When I press ALT it says VK_MENU.

        Is this little tool cross-platfrom ?

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          No, I get 2 actions one for each keypress in the order I press them. I haven't been able to trigger a VK_ALT on either system.

          I might add the constraint, copy, and alt masks to the key tool.

          Hi

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            VK_ALT == VK_MENU == VK_COMMAND == 18

            It's just that VK_MENU won out in the Hash conflict. (so a problem in my keytool.)

            Hi

            1 Reply Last reply Reply Quote 0
            • D Offline
              driven
              last edited by

              hi Jim,

              I've got an apple wireless keyboard, and just tested the keycodes, can't find home yet but will do a mock up of all the variants, that require using the fn() key...

              cheers

              john

              learn from the mistakes of others, you may not live long enough to make them all yourself...

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by

                Thanks John.

                fn() key?

                On Windows, using VK_DELETE, VK_PRIOR, and VK_NEXT, I am only getting results from onKeyUp. Nothing at all from onKeyDown.

                Hi

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by

                  wireless keyboard, similar to laptop layout

                  only onKeyUp for prior and next...

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    It needs work...

                    1. a class var KeyTool.@@instance to hold the handle.
                    2. a use() class method that conditionally either calls new() or gets the instance if the tool is already loaded.
                    3. the menu item needs to call the JF::KeyTool.use() method.
                    4. a menu validation proc that properly checks the menuitem activate and deactivate

                    Currently clicking the menu item, does not really stop the tool.
                    EDIT: (It actually creates a new instance.) PM'd you an updated file with the changes above.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      driven
                      last edited by

                      you can also change to other languages layouts and try them...
                      apple_KeyboardViewer.jpg

                      learn from the mistakes of others, you may not live long enough to make them all yourself...

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        This is kinda weird. While the KeyTool was active, I had a face selected (prior to activating the tool,) and when I pressed the DELETE key, the face was deleted.

                        Perhaps the tool should clear the selection ?

                        Wonder what other things might happen via Shortcuts when the tool is active ?

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          driven
                          last edited by

                          all the shortcut keys, SU and system just carry on working and don't register in the console at all, here at least

                          learn from the mistakes of others, you may not live long enough to make them all yourself...

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            driven
                            last edited by

                            onKeyUp : Key code: 127 using standard apple back-delete
                            onKeyUp : Key code: 63272 ( VK_DELETE ) using fn(key)+standard apple back-delete
                            NO onKeyDown for delete

                            learn from the mistakes of others, you may not live long enough to make them all yourself...

                            1 Reply Last reply Reply Quote 0
                            • Dan RathbunD Offline
                              Dan Rathbun
                              last edited by

                              @driven said:

                              all the shortcut keys, SU and system just carry on working and don't register in the console at all, here at least

                              The DELETE key registered "onKeyUp : Key code: 46 ( VK_DELETE )" in the Console (on my PC,) and deleted the selected face.

                              It seems weird that keys would bubble up from a Tool instance keytrap callback. I can see having a bubble method that allows passing the key up to Sketchup, but to do it all the time?

                              I'm not here much anymore.

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

                              Advertisement