DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Define Keyboard Shortcuts for Specific Application on Winodws


The TeXworks on Windows use Ctrl-t to compile the document, which is not very convenient. I want to use Alt-t to replace it.

Press Win key and input Active Window Info to start this application (it's installed by Autohotkey, so you need install Autohotkey beforehand).

With Active Window Info I got the identity of the TeXworks window: ahk_exe texworks.exe. Create an autohotkey script texworks-hotkeys.ahk:

!t::
if (WinActive("ahk_exe texworks.exe")) {
  SendInput ^t
}
Return

Double click the file, and you can use Alt-t to compile LaTeX documents now.



Published

May 11, 2018

Last Updated

May 11, 2018

Category

Tech

Tags

  • autohotkey 13
  • shortcut 5
  • windows 67

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor