sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Keycodes intelmac

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 473 Views 2 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.
    • romboutR Offline
      rombout
      last edited by

      Hi everyone,

      does someone know the keycodes for a intelmac.
      Im trying to use Jan Sandstrom JSMovetool but it wont work on a intel based mac...
      Im dont know any ruby script, but i thinkit has something todo with the keycodes. I opened de RB-file and saw it was written for PC and Powerpc mac.
      I know some AS flash scripting and im almost sure it doesnt work cause of the wrong keycodes here. See

      def activate   
          # This sets the label for the VCB
          Sketchup;;set_status_text "Distance", SB_VCB_LABEL
      end
      
        model = Sketchup.active_model 
        entities = model.active_entities
        ss = model.selection
      
      
      if RUBY_PLATFORM == "i386-mswin32" then                 # Win XP  
          $leftArrow = 37          # Arrow Left Key 
          $upArrow  = 38           # Arrow Up Key 
          $rightArrow  = 39        # Arrow Right Key 
          $downArrow = 40          # Arrow Down Key 
          $altKey = 18		# Alt Key
          $shiftKey = 16		# Shift Key
          $controlKey = 17		# Control Key
      
      elsif RUBY_PLATFORM == "powerpc-darwin" then            # Mac OSX 
          $leftArrow = 63234       # Arrow Left Key 
          $upArrow  = 63232        # Arrow Up Key 
          $rightArrow  = 63235     # Arrow Right Key 
          $downArrow = 63233       # Arrow Down Key 
          $altKey  = 524288        # Alt/Option Key 
          $shiftKey = 131072		# Shift Key
          $controlKey = 1048576	# Command (Apple) Key
      
      elsif RUBY_PLATFORM == "intelmac" then            # Mac OSX 
          $leftArrow = 108       # Arrow Left Key 
          $upArrow  = 30        # Arrow Up Key 
          $rightArrow  = 39     # Arrow Right Key 
          $downArrow = 31       # Arrow Down Key 
          $altKey  = 524288        # Alt/Option Key 
          $shiftKey = 16		# Shift Key
          $controlKey = 20	# Command (Apple) Key
      
      end #if
      
      

      i tried some things getting the keycode but i think its not running cause of this line "elsif RUBY_PLATFORM == "intelmac"
      i just put in intelmac, but cause i dont know any ruby im not sure thisis correct.
      if someone could help, please your welcome
      😎

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

        Here is a snippet of a tool that prints out the key code for pressed keys. Download the file in your Plugins folder. Open the Ruby Console to see the codes.


        KeyTool.rb

        Hi

        1 Reply Last reply Reply Quote 0
        • romboutR Offline
          rombout
          last edited by

          Thanx Jim...
          i had some other solutions but they give me different codes back.
          By know i found that thecodes are the same as on the powerpc-darwin OS.
          I think ineed to work on this part"elsif RUBY_PLATFORM == "powerpc-darwin" then"
          I think on my imac it passes this on cause i have intel duo core...
          So if you happen to know the code for this part

          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