
UndoCloseTabKey. tAttribute('oncommand', 'undoCloseLastClosedTabOrWindow()') UndoCloseTabKey.removeAttribute('command') Let undoCloseTabKey = ('key_undoCloseTab') I'll leave it here to serve as an example for other customizations.) // make Ctrl-Shift-T reopen last tab OR last window, depending on which one was closed last ( Firefox introduced the Shift-Ctrl-T as an universal undo ( change set), so the example here is not necessary anymore. SettingsKey.addEventListener('command', this, false) tAttribute("oncommand", "openPreferences()") tAttribute("modifiers", "accel") Ĭreate a new keyboard shortcut // create keyboard shortcut to Toolbar > Settings with Ctrl-, Let openDownloads = ('key_openDownloads') Let keySwitchDirection = ('key_switchTextDirection') Ĭhange an existing keyboard shortcut // remap Ctrl-J to downloads (removing it from focusing the browser bar) Remove an existing keyboard shortcut // remove Ctrl-Shift-X, so that I can map it to 1Password in the 1Password app later Put these snippets into config.js, where I wrote Place your keyboard shortcut changes here. Let Īfter modifying these files, you always have to go to about:support and run Clear startup cache, to restart the browser with the new config.
/usr/lib/firefox/browser/defaults/preferences/config-prefs.jsĬonfig-prefs.js: pref("", "config.js").
Firefox.app\Contents\Resources\config.js.C:\Program Files\Mozilla Firefox\defaults\pref\config.js.
C:\Program Files\Mozilla Firefox\defaults\pref\config-prefs.js. You can change key bindings in Firefox with AutoConfig, without having to unpack and modify the Firefox binary.Ĭreate a config-prefs.js and config.js file: If you have more questions, please report issues on github. I have an article written up with all the details that may interest you: So they will work better than remapping webextensions. I advise you to first start with the binary option, because you will have working keyboard shortcuts in 20 minutes, instead of just being at the start of the mercurial clone procedure :)īoth of these methods are independent of any extensions/webextensions and will ALWAYS work, even in the location bar and even on protected pages (as you asked in the comments). It's not super official, but basically you can unpack browser/omni.ja, edit the keybindings in chrome/browser/content/browser/browser.xul, repack it, delete startup cache and it will work.Īlternatively, you can compile your own firefox and then you don't need to unpack the binary, if you consider unpacking and repacking more hacky, than building.Īnother advantage of building is that you can store your modifications on top of the official sources in git and always rebase, like I do here: let it remain as modifier and don't send ESCAPEį18 = hs.hotkey.bind(, - forward wordįunction() fastKeyStroke(hotkey.mod, hotkey.direction) end,įunction() fastKeyStroke(hotkey.mod, hotkey.There is a way. If hotkey held longer than this amount of time send ESCAPE if no other keys are pressed. Leave Hyper Mode when F18 (Hyper/Capslock) is pressed, Only trigger as modifier if held longer than thisj So instead of scheduling a task to run each minute to check what the wifi network is, when a wifi event happens the OS API that you're registered to triggers a call to your task. Enter Hyper Mode when F18 (Hyper/Capslock) is pressed One benefit that hammerspoon brings is it bridges the gap between your scripts/tasks and operating system APIs. Any ideas on why that's happening? My a is below: - A global variable for the Hyper Mode That is, it's very slow when I press down the CAPSLOCK+h which should simulate pressing the "<-" key repeatedly but it's very delayed and only sends one per second. Everything works but there's an issue with delay when repeating. I'm trying to simulate CAPSLOCK+h, j, k, l to act as VIM movement keys.
When menu appears execute Hammerspoon Script by pressing CTRL+S. Now Enter World Circuits and wait till menu loads. Go to RemotePlay > Open GT7 > go to Controller Settings and change D-PAD like: UP: Accelerate.
#Hammerspoon scripts windows#
The windows are properly arranged but they. Open Hammerspoon > Open Config > choose a. I initially tried to use the raise() method on the hs.window object, but it didn't achieve the desired effect. I have my CAPSLOCK bound to F18 (karabiner) to act as a modifier key. I've been working on a Hammerspoon script to arrange my Finder windows (in the current space) in a grid layout, and I wanted to make sure that all windows are visible (brought to the front).