Inkscape.org
Beyond the Basics Pasting an object at mouse posistion
  1. #1
    Johan Wingård Johan Wingård @johan.wingard

    Hello! Currently I have all my objects that I use in my work at the side of the workspace and copy and paste them into the workspace in the center. The steps are mostly me scrolling out and then pressing the scroll-wheel to pan to the right, select the object I want to use hit ctrl+c then pan back to the left and place my cursor where I want to place the object and hit ctrl+v. That's a lot of steps and since I do it so many times it adds up to a lot time wasted. What I would like is to either use commandline or autohotkey (or a combination) to make this whole process just be one keystroke. I'm planning on getting a streamdeck to help with this since then I would be able to display the object on the keys of the streamdeck.

    Does anyone know what I need to type into commandline to select an object in the active window and then copy/paste it at the cursor?

  2. #2
    Tyler Durden Tyler Durden @TylerDurden
    *

    I don't know about command line, but I might approach it this way:

    • Four objects in one Inkscape window.
    • Working document in another fullscreen window (second instance of Inkscape).
    • Place pointer in the working document where the paste will happen.
    • Alt-Tab to the other Inkscape window and use Tab key to select object, Ctrl-C (copy).
    • Alt-Tab back and Ctrl-V (paste), Esc to de-select.
    • Repeat
  3. #3
    Patrick Storz Patrick Storz @Ede_123

    You could also just save the objects as symbols and use those.

  4. #4
    Johan Wingård Johan Wingård @johan.wingard

    @TylerDurden
    I have around 30-40 objects that I use so that would be alot of tabing just to get the right object.


    @Ede_123

    That does make things faster, is there a way to edit the text in an object once it has been turned into a symbol?

  5. #5
    Patrick Storz Patrick Storz @Ede_123
    *
    johan.wingard

    is there a way to edit the text in an object once it has been turned into a symbol?

    It's the id attribute which you could edit in the XML editor (or a text editor once you save the file) - that's the most "direct" way I know.

    Note however that if you change the ID *after* having used the symbol already, all references in the current document will break, making the objects vanish.

     

    Edit: Partial correction - you can also set a title on the object before (or manually in the XML editor after) converting it to a symbol - that will even work in the current document without breaking references.

  6. #6
    Tyler Durden Tyler Durden @TylerDurden
    johan.wingard

    I have around 30-40 objects that I use so that would be alot of tabing just to get the right object.

    Yeah, somehow I thought there were just a handful.

     

    johan.wingard

    is there a way to edit the text in an object once it has been turned into a symbol?

    After placing a symbol on the canvas, it can be edited using Alt-Shift-D (break link to original). It will then be a standalone group, the original symbol will still be available for use.

    (My screen recorder interferes w drag& drop, so I move out of view to drag a symbol onto the canvas)

  7. #7
    Johan Wingård Johan Wingård @johan.wingard

    @TylerDurden  Thanks mate, even though this wasn't what I had in mind it will save me some time :)

    If someone else do know how to do what I originally wanted I would love to know how :)

  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    Ok, how about this, an AutoHotkey script (Windows):

    All assets exist in the current document and have unique ID. The Find dialog (Ctrl+F) is set for ID only, exact match.

    Script will:

    • Ctrl+F #switch to Find dialog.
    • Tab #put focus to first text entry box
    • <pause the script for text entry>  (or multiple scripts, one for each object)
    • Tab15x #move highlight to Find button. (Alt+F seems erratic)
    • Enter #runs Find operation.
    • Ctrl+C #copies selected object.
    • Esc #exits Find dialog.
    • Ctrl+V pastes copied object at pointer.

     

    You almost certainly could write an extension to do this, but in the meantime I'd try the hotkey method.

    Warmer?

  9. #9
    Xav Xav @Xav👹

    A lesser used feature of Inkscape that might help when doing this "manually" is the View > Duplicate Window menu entry. This opens a second Inkscape window which shows the same content as the first. But you can zoom and pan, as well as resize and reposition the window independently of the first. In this case one window would be arranged to focus on the objects at the side of the canvas whilst the other would be the normal working window. You can then select and copy in the "objects" window, but paste into the work window without having to pan back and forth.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Pasting an object at mouse posistion