Code Monkey home page Code Monkey logo

Comments (8)

hluk avatar hluk commented on September 17, 2024 1

However, changing shortcut to Ctrl+Shift+V will break paste actions for most applications.

Yeah, I thought it might be the case (I only tested it in Firefox and kitty terminal emulator).

Alternate solution would be to check the current window title before triggering the paste:

global.paste = function() {
    const window = currentWindowTitle();
    if (window == 'Alacritty') {
        // Shift+Ctrl+V
        sendShortcut('42:1', '29:1', '47:1', '47:0', '29:0', '42:0');
    } else {
        // Shift+Insert
        sendShortcut('42:1', '110:1', '110:0', '42:0');
    }
}

from copyq.

Gufderald avatar Gufderald commented on September 17, 2024

For now I found a workaround - mapping Shft+Insert chord to a paste action - it works for gnome terminal at least.

from copyq.

Gufderald avatar Gufderald commented on September 17, 2024
  - { key: Insert,         mods: Shift,                           action: Paste            }

For alacritty this line should be set instead of PasteSelection action

from copyq.

Gufderald avatar Gufderald commented on September 17, 2024

Created another issue in https://github.com/hluk/copyq-commands; created MR with edited README for wayland support script.

from copyq.

hluk avatar hluk commented on September 17, 2024

I picked Shift+Insert because it actually is the default shortcut for pasting (clipboard or selection) in most terminal emulators and applications.

You can try modifying the paste() function to send Ctrl+Shift+V for pasting:

    global.paste = function() {
        sendShortcut('42:1', '29:1', '47:1', '47:0', '29:0', '42:0')
    }

from copyq.

Gufderald avatar Gufderald commented on September 17, 2024

would this eventually help?: #633

Thanks, I'll give it a try.

from copyq.

Gufderald avatar Gufderald commented on September 17, 2024

I picked Shift+Insert because it actually is the default shortcut for pasting (clipboard or selection) in most terminal emulators and applications.

You can try modifying the paste() function to send Ctrl+Shift+V for pasting:

    global.paste = function() {
        sendShortcut('42:1', '29:1', '47:1', '47:0', '29:0', '42:0')
    }

Thanks! However, changing shortcut to Ctrl+Shift+V will break paste actions for most applications.

from copyq.

Gufderald avatar Gufderald commented on September 17, 2024

Hi! My mr to docs for scripts was merged, so I suppose this may be closed. I tested sollutions from @gowallasnewpony and @hluk - they both works fine as a workaround too, thanks a lot.

from copyq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.