Skip to content

Commit

Permalink
directvt#86 WIP: Fix interference with vtm desktop (Ctrl+PgUp/PgDn)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-sdn-o committed Oct 24, 2024
1 parent a8bcccf commit 21d9a60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/netxs/desktopio/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1424,11 +1424,10 @@ namespace netxs::input
}

auto meta(si32 ctl_key = -1) { return ctlstate & ctl_key; }
template<class ...Args>
auto chord(si32 k, Args&&... mods)
auto chord(si32 k, si32 mods = {})
{
if constexpr (sizeof...(mods)) return k == keybd::keycode && (meta(mods) && ...);
else return k == keybd::keycode && !meta(hids::anyMod);
if (mods) return k == keybd::keycode && meta(mods) && !meta(~mods & hids::anyMod);
else return k == keybd::keycode && !meta(hids::anyMod);
}

// hids: Stop handeling this event.
Expand Down

0 comments on commit 21d9a60

Please sign in to comment.