-1

I tried simulating with xdotool but an exception is raised like

Error: Can't open display: (null) even after trying with export DISPLAY=':0.0'.

What am I missing?

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Jeyashree
  • 26
  • 3
  • Can you provide the code you've tried? – Andria Mar 15 '17 at 18:15
  • I tried giving xdotool from command prompt #xdotool shift+~ . Even that was not working was for me – Jeyashree Mar 15 '17 at 18:17
  • I believe you are using the wrong key command to type the ~ key, maybe use ` instead because that is the lower case, or maybe it has a different name, I can't currently test this so I'm unsure. – Andria Mar 15 '17 at 18:25
  • yeah you are correct i used shift+~ instead of shift+` – Jeyashree Mar 16 '17 at 08:12
  • This is what I tried. Now it is giving me xdotool not found error #!/usr/bin/python import os cmd = 'xdotool shift+\`' os.system(cmd) – Jeyashree Mar 16 '17 at 08:21

1 Answers1

3

Okay, so your real problem here is that you didn't even use xdotool key <keys> you just used xdotool <keys> but besides that if you want to send a backtick you need to use xdotool key grave and for the tilde use xdotool key shift+grave

Andria
  • 4,712
  • 2
  • 22
  • 38