taviso / hotcorner

Tiny Hot Corners for Windows 10
GNU General Public License v3.0
380 stars 69 forks source link

Improved key state and added hotkeys for closing/temporary disable #1

Closed asamy closed 7 years ago

asamy commented 7 years ago

This should help a little, I am not sure if the hotkeys are actually suitably aligned...

Following hotkeys are new: LCTRL+LALT +A => toggle +C => shut down

taviso commented 7 years ago

Thanks! I like this, but I'm wondering if it can be made easier to hack if someone wants different hotkeys, something like this at the top with an array of keycodes and callbacks:

static const FARPROC HotKeyCallbacks[256] = {
 ['A'] = ToggleCorners,
 ['C'] = ExitCorners,
 ['G'] = GrowCornerZone,
 ['S'] = ShrinkCornerZone,
 ['Z'] = SwitchToNextCorner,
// etc
}

Then disabling/adding/changing hotkeys and recompiling is easier?

asamy commented 7 years ago

Looks good now? Maybe we should also remove the mouse state checks in corner thread?

taviso commented 7 years ago

I like it, merged. Thanks!

taviso commented 7 years ago

Oops, it doesn't work with my version of visual studio, let me try to fix it up.

asamy commented 7 years ago

That's odd, I used VS 2015 compiler.

taviso commented 7 years ago

Ah, I had some debugging flags and it didn't like the FARPROC cast, I just rearranged it a bit.