BlueWave Studio forum
App shortcut to toggle Ctrl-F3 - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: OpenAuto Pro (https://bluewavestudio.io/community/forum-86.html)
+--- Forum: External applications (https://bluewavestudio.io/community/forum-68.html)
+--- Thread: App shortcut to toggle Ctrl-F3 (/thread-2940.html)



App shortcut to toggle Ctrl-F3 - Justindu - 09-19-2021

Is it possible to create an application shortcut that executes a keystroke?  like Ctrl+F3?

From the Applications menu in OAP, I'd like to toggle to Autobox - CarPlay by touching a shortcut icon.

Justin


RE: App shortcut to toggle Ctrl-F3 - Tnias - 09-20-2021

Have a look at 'xdotool'. You can run the command and have it send the keystokes you want. With the --window option you can even direct it to a specific window if you like.


RE: App shortcut to toggle Ctrl-F3 - KreAch3R - 09-20-2021

#!/bin/bash

# Get the "window id"
result=$(wmctrl -l | grep 'autoapp' | grep -Eo '0x[0-9a-f]+')
# Convert hex to decimal
window=$(echo $(($result)))

# Send "c" keystroke to OAP/AA to pause music
# https://bluewavestudio.io/community/showthread.php?tid=2048
xdotool windowactivate --sync $window key C

I am using the above script to toggle pause.


RE: App shortcut to toggle Ctrl-F3 - Justindu - 09-21-2021

Made this: F3.py

#!/usr/bin/env python3
import pyautogui
pyautogui.hotkey('ctrl','f3')

   


RE: App shortcut to toggle Ctrl-F3 - KreAch3R - 09-21-2021

(09-21-2021, 03:30 PM)Justindu Wrote: Made this: F3.py

#!/usr/bin/env python3
import pyautogui
pyautogui.hotkey('ctrl','f3')

Resume - AppShortcut

Clean!


RE: App shortcut to toggle Ctrl-F3 - Justindu - 09-26-2021

(09-21-2021, 06:03 PM)KreAch3R Wrote:
(09-21-2021, 03:30 PM)Justindu Wrote: Made this: F3.py

#!/usr/bin/env python3
import pyautogui
pyautogui.hotkey('ctrl','f3')

Clean!

Thank you! - looks like this:
   


RE: App shortcut to toggle Ctrl-F3 - GSPW - 09-26-2021

Hey Justindu, just so you know, none of your attachments can be displayed at my end.


RE: App shortcut to toggle Ctrl-F3 - Justindu - 09-30-2021

(09-26-2021, 09:48 PM)GSPW Wrote: Hey Justindu, just so you know, none of your attachments can be displayed at my end.

bizarre - I'll see if I can host the images somewhere public. Wish I could just paste it into the post. - Ah, I figured out the attachment feature. Hope you can see the screen shot now. Thank you.


RE: App shortcut to toggle Ctrl-F3 - GSPW - 10-03-2021

I confirm they can now be seen!