By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,156 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,156 IT Pros & Developers. It's quick & easy.

Help in AutoKeys - Sending a Shifted Case Letter

P: 6
hellos im jason and i am trying to send <shift> + o
but i want the o to be a capital O. this o is in the o in OH. then when i press w the script will stop.
this script will not send the shifted O only the lowercase o.
im using the program Autokey



Expand|Select|Wrap|Line Numbers
  1. keyboard.send_key("<SHIFT>")
  2. time.sleep(.33)
  3. keyboard.press_key("o")
  4. time.sleep(.33)
  5. #keyboard.press_key("<shift>")
  6. time.sleep(2.33)
  7. keyboard.release_key("w")
Oct 20 '15 #1
Share this Question
Share on Google+
9 Replies


NeoPa
Expert Mod 15k+
P: 31,494
Hello Jason. Are you in the right forum? This is for Access and VBA, but your code doesn't look like VBA.

If you want to do similar stuff in VBA then you'd use :
Expand|Select|Wrap|Line Numbers
  1. SenKeys()
Oct 20 '15 #2

P: 6
if you seach string "autokey" on bytes.com all the other posts related to Autokey are in home > topics > microsoft access / vba > questions > keyboard shortcuts to execute code? but if im wrong please help me get in teh righ t location thanks again
Oct 20 '15 #3

P: 6
could you reread this post and see if it makes more sense now
Oct 20 '15 #4

jforbes
Expert 100+
P: 1,107
I don't recognize the language you are using, but you could try using and uppercase "O" instead of a lower case "o":
Expand|Select|Wrap|Line Numbers
  1. keyboard.press_key("O")
  2. 'instead of
  3. keyboard.press_key("o")
Oct 20 '15 #5

P: 6
i ment to say i need a persitant shift and the o key to like <shift>o
Oct 20 '15 #6

jforbes
Expert 100+
P: 1,107
From https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".
Oct 20 '15 #7

P: 6
this is in wrong place is python sorrys but answer is
keyboard.press_key ("<shift>+o")
the + modifier makes them both presses
Oct 20 '15 #8

P: 6
the best way is not to ask python questions in VBA
but what works is
keyboard.send_key("<shift>+o")
the + modifier sends them both without teh + it would send shift then o
or keyboard.press_key("<shift>+o")
Oct 20 '15 #9

NeoPa
Expert Mod 15k+
P: 31,494
Let me move this to the Python forum for you. I don't know how busy it is over there or who's hanging in there ATM but it's a better place for the question than here.

Good luck :-)
Oct 21 '15 #10

Post your reply

Sign in to post your reply or Sign up for a free account.