![hammerspoon autohotkey script hammerspoon autohotkey script](https://audiotheme.com/content/uploads/hammer-customize-fonts.jpg)
- #HAMMERSPOON AUTOHOTKEY SCRIPT FOR MAC#
- #HAMMERSPOON AUTOHOTKEY SCRIPT FOR WINDOWS 10#
- #HAMMERSPOON AUTOHOTKEY SCRIPT CODE#
I decided to disable those shortcuts in Emacs with an elisp config script.
![hammerspoon autohotkey script hammerspoon autohotkey script](https://www.howtogeek.com/wp-content/uploads/2019/04/img_5cc4d8386c5df.png)
I was probably typing these shortcuts by accident in Emacs. Should I support these shortcuts in my scripts? After reviewing the handful of Emacs shortcuts that differ in this way I decided to drop support for them in the scripts because I wasn't using them anyway. These shortcuts preform different actions, but exploit the subtle difference of letting go of Ctrl vs holding down Ctrl. Set fill column is bound to: Ctrl-x f (hold Ctrl between typing x and f) While I was working my way through the default Emacs keybindings I noticed some shortcuts in Emacs I'd never thought about.įile file is bound to: Ctrl-x Ctrl-f (release Ctrl between typing x and f) This macro tries to emulate how Emacs deletes lines by first selecting the entire line, cutting it and then deleting it.
#HAMMERSPOON AUTOHOTKEY SCRIPT CODE#
Hammerspoon and AutoHotkey had potential, but I needed to make sure they could do what I wanted, so I wrote some experimental code in these new environments.įirst I set out to see if AutoHotkey could emulate Emacs style text selection.Įnter fullscreen mode Exit fullscreen mode
#HAMMERSPOON AUTOHOTKEY SCRIPT FOR MAC#
For example Ctrl+a is mapped to the start of the line character just like Emacs.īoth XKeymacs and the default shortcuts for Mac failed to support two important Emacs features: On Mac I couldn't find any app to solve the problem, but OSX supports most Emacs shortcuts out of the box. For Windows I found XKeymacs which described it self as "a keyboard utility to realize Emacs like-usability on all windows applications". I started by looking for something I could download or buy to solve the problem. Would it be possible to use Emacs shortcuts to control both operating systems in the same way? Navigating text starts by holding down a modifier key such as Ctrl or Alt and your hands never leave the home row. Once inside Emacs you enter another world of keyboard shortcuts. Instead of memorizing these differences I wondered if there was a better solution. Copy and paste can be dealt with by changing settings in the OS, but other shortcuts are quite different such as Cmd+q and Alt+F4 (quit an app).
![hammerspoon autohotkey script hammerspoon autohotkey script](https://www.fileeagle.com/data/2015/09/Screenshot_0_AutoHotkey.jpg)
Some differences are easy to workaround such as Ctrl+c and Cmd+c (copy). But there was one frustrating aspect of switching back to Windows, keyboard shortcuts. Having Ubuntu in your terminal is handy because it more closely resembles the servers I deploy my code to. I was pleasantly surprised with Ubuntu on Windows 10.
#HAMMERSPOON AUTOHOTKEY SCRIPT FOR WINDOWS 10#
When Microsoft released Ubuntu for Windows 10 I took the opportunity to try web development on Windows after 8 years on a Mac.