Skip to content

Commit

Permalink
reverse setting priority
Browse files Browse the repository at this point in the history
  • Loading branch information
hetima committed May 23, 2017
1 parent 58a6bdf commit 3d9963d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hyperex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ local CHyperImpl = {

bind = function(self, fromKey, fromMod)
local b = CBinder.new(self):bind(fromKey, fromMod)
table.insert(self._binders, 1, b)
table.insert(self._binders, b)
return b
end,

mod = function(self, modifiers)
local m = CModifier.new(self):mod(modifiers)
table.insert(self._modifiers, 1, m)
table.insert(self._modifiers, m)
return m
end,

Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ hx:setEmptyHitKey('f18') -- disabled
hx:bind('f1'):to('f18') -- enabled but confuse
```

Give priority to later settings. `bind` takes precedence over `mod` all the time.
Give priority to early settings. `bind` takes precedence over `mod` all the time.
```lua
local hx = hyperex.new('f18')
hx:mod({'alt'}):to('f2','f3') -- only f3 is enabled
hx:bind('f1'):to(...) -- disabled
hx:bind('f1'):to(...) -- enabled
hx:mod({'ctrl', 'shift'}):to('f1','f2') -- only f2 is enabled
hx:bind('f1'):to(...) -- enabled
hx:bind('f1'):to(...) -- disabled
hx:mod({'alt'}):to('f2','f3') -- only f3 is enabled
```

hyperex handles only real keyboard input.
Expand Down

0 comments on commit 3d9963d

Please sign in to comment.