Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7939175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:01:21+00:00 2026-06-03T23:01:21+00:00

Sorry that I have to describe the functionality in such a roundabout manner, but

  • 0

Sorry that I have to describe the functionality in such a roundabout manner, but I’ve no idea how to best implement the wanted functionality*

I have a simple program that puts some data into the clipboard when a global hotkey is pressed. The usual use case for the user is then to directly paste that text into a textfield in Photoshop. I.e. – assuming ctrl-x invokes the global hotkey – they’re constantly doing ctrl-x ctrl-v. Clearly that’s bad design.

So what’s the simplest way to basically simulate the ctrl-v event so that Photoshop will paste the text directly without an additional keypress?

As the winapi tag implies I don’t care about Macs here. Has to work under Win 7, compatibility with XP/Vista would be a definite plus. Rest of the script is written in Python3 with PyQt4, but I can write some c extension if necessary too.

PS: Everyone who has a better idea wrt the title is more than welcome to improve it.

*And I want to avoid the trap of implementing the simple halve of a problem and then asking for something impossible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:01:23+00:00Added an answer on June 3, 2026 at 11:01 pm

    Use SendInput(). I didn’t test this, but it should work:

    INPUT ctrlV [4];
    ZeroMemory(ctrlv, sizeof ctrlV);
    
    ctrlV [0].type = INPUT_KEYBOARD;
    ctrlV [0].ki.wVk = VK_LCONTROL;
    
    ctrlV [1].type = INPUT_KEYBOARD;
    ctrlV [1].ki.wVk = 'V'; //assuming ASCII
    
    ctrlV [2].type = INPUT_KEYBOARD;
    ctrlV [2].ki.wVk = 'V'; //assuming ASCII
    ctrlV [2].ki.dwFlags = KEYEVENTF_KEYUP;
    
    ctrlV [3].type = INPUT_KEYBOARD;
    ctrlV [3].ki.wVk = VK_LCONTROL;
    ctrlV [3].ki.dwFlags = KEYEVENTF_KEYUP;
    
    SendInput (4, ctrlV, sizeof (INPUT));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the poor title. I really have no idea how to describe this
I have a signal that blocks SIGINT and basically says Sorry, you can't quit.\n
Sorry that I haven't done much of my own research but I do not
Sorry that I can't find the answer through google - But I know this
I'm sorry that I haven't deeply understood HBase and Hadoop MapReduce, but I think
first of all, sorry if that question is dumb but I´m a total newbie
First of all, sorry about that title. I'm not the best at writing those
Sorry if the title is not that specific, but I don't know how else
Sorry for the poor title, but I couldn't think of another way to describe
I have two tables, splits and dividends that describe events in the stock market.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.