LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 02-01-2019, 11:58 AM   #16
eric1234
LQ Newbie
 
Registered: Jan 2019
Distribution: MX Linux 18
Posts: 14

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by dugan View Post
The list of possible modifiers is right here:

https://www.autopy.org/documentation...rence/key.html

Code:
Modifier:	META
Modifier:	ALT
Modifier:	CONTROL
Modifier:	SHIFT
You want no modifiers, so the third argument would be "[]".

Your call should therefore be:

Code:
autopy.key.toggle("t",down,[])
Thank you so much, this worked, with the following code
Code:
import autopy
ar = open("autorun.txt", "r+") 
down = ar.read().strip()
ar.close()
ar = open("autorun.txt","w")
if (down == "True"): 
    ar.write("False")
    autopy.key.toggle("t",True,[])
else: 
    ar.write("True")
    autopy.key.toggle("t",False,[])
ar.close()
But, now I have a new problem, it seems, with the "t" key being held down by AutoKey, it precludes it from noticing when I hit the script activation key a second time. (something that was not true in Windows AutoHotKey)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoHotkey on Linux? kktsuri Linux - Software 9 11-03-2014 12:54 PM
alternative for Autohotkey in RHEL 6 vivi874 Red Hat 7 10-26-2014 07:48 PM
LXer: Non-Linux FOSS: AutoHotkey LXer Syndicated Linux News 0 09-11-2014 06:33 PM
AutoHotkey like utility for X? kcin Linux - Software 2 02-18-2008 01:29 AM
Hey there, I'm here to promote my autohotkey-like program peabodyman LinuxQuestions.org Member Intro 1 02-18-2008 01:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 10:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration