Skip to content

Create DefaultKeyBinding.dict with Hammerspoon

License

Notifications You must be signed in to change notification settings

dplusic/hammerspoon-DefaultKeyBinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hammerspoon-DefaultKeyBinding

Create DefaultKeyBinding.dict with Hammerspoon

Getting started

Usage example

local DefaultKeyBinding = hs.loadSpoon('DefaultKeyBinding')
local m = DefaultKeyBinding.methods
DefaultKeyBinding:writeBinding({
    { { 'home' }, { m.moveToBeginningOfLine } },
    { { 'end' }, { m.moveToEndOfLine } },
    { { 'shift', 'home' }, { m.moveToBeginningOfLineAndModifySelection } },
    { { 'shift', 'end' }, { m.moveToEndOfLineAndModifySelection } },
    { { 'ctrl', 'home' }, { m.moveToBeginningOfDocument } },
    { { 'ctrl', 'end' }, { m.moveToEndOfDocument } },
    { { 'ctrl', 'shift', 'home' }, { m.moveToBeginningOfDocumentAndModifySelection } },
    { { 'ctrl', 'shift', 'end' }, { m.moveToEndOfDocumentAndModifySelection } },
    { { 'pageup' }, { m.pageUp } },
    { { 'pagedown' }, { m.pageDown } },
    { { 'shift', 'pageup' }, { m.pageUpAndModifySelection } },
    { { 'shift', 'pagedown' }, { m.pageDownAndModifySelection } },
    { { 'ctrl', 'x' }, {
        { { 'ctrl', 'x' }, { m.insertText, '"ctrl-x ctrl-x"' } },
    } },
})

References

About

Create DefaultKeyBinding.dict with Hammerspoon

Resources

License

Stars

Watchers

Forks

Packages

No packages published