lesderid / keynavish Goto Github PK
View Code? Open in Web Editor NEWControl the mouse with the keyboard, on Windows.
License: GNU General Public License v2.0
Control the mouse with the keyboard, on Windows.
License: GNU General Public License v2.0
DMD supports resource files as an additional input. We should use this to add a description, version, etc. to the executable.
This issue also exists in keynav, but I figured it would be helpful to also mention it here. Any keynavish clicks in DF don't actually click anything in game. I've tried both fullscreen and windowed modes, with no luck. This might be something that has to be fixed by the DF devs, but I wanted to make an issue here so that when I tell them about it, I at least have someone familiar with the keynavish codebase to back me up when i say "hey DF devs pls fix".
Observed on Windows 10, version 2004
If the process launching keynavish isn't foregrounded (i.e. doesn't own the window returned by GetForegroundWindow()
), keynavish will be drawn below other windows.
We can't simply foreground the grid window, as this breaks windowzoom
and causes the foreground window to be deactivated (which we may not want).
Another possible solution would be to set the foreground window to the grid window and then reset it back to the original one:
HWND originalWindow = GetForegroundWindow();
SetForegroundWindow(keynavishWindow);
SetForegroundWindow(originalWindow);
However, this seems to be visually glitchy.
The recording/macro file format is not compatible with keynav's.
It would be nice if these were compatible, but it might not be worth the time and code complexity.
Because the Windows APIs are nothrow
, and for ease of development, there are lots of assumeWontThrow
s in the code. If an exception does occur, this will crash keynavish.
We need to figure out which assumeWontThrow
s are correct (if any) and which need to be replaced with proper exception handling.
We should probably catch most exceptions and throw new exceptions with a user-friendly message and catch those in exception handlers that call showError
. We should also check which of the current showError
calls should be replaced with exceptions.
keynavish is probably not properly DPI aware right now, which might cause issues with grid position and size.
A good start would be to make a list of what needs to be fixed.
Dragging with a modifier (ctrl
, shift
, etc.) doesn't work properly. When you try to drag with a modifier, it sends the keystrokes but the result is a regular drag operation.
The notification area icon does not come back if the shell process (generally explorer.exe
) is terminated and restarted. Presumably there's a window message we're ignoring.
I have my .keynavrc set up with m drag 1
- here is my full config, in case it's helpful.
My process for clicking and dragging something is:
But that only works 50% of the time.
If i use a website like https://cps-check.com/drag-test for testing, i can see visually when it's successfully holding down left click. For some reason, i need to press M twice sometimes, before it starts dragging? My only guess is that my left clicking at the end isn't "turning off" drag, so when i press M a second time to drag something else, instead of starting to drag it's "turning drag off". But I can't use M at the end to "drag to where I have keynavish aimed at, and toggle drag off", unless I'm misunderstanding something? What's the intended way to use drag, if what I'm doing isn't right? (Or if I'm doing everything right and it's still breaking- consider this a bug report :) )
Thanks for your time.
Thank you for the development of the Windows port of keynav
,
I want to make this tool available on scoop
repos.
I want to load keynavrc
config on the same location where
keynavish.exe
is located first, then other places, this makes it portable
And release compressed file including executable keynavish.exe
and keynavrc
default config
or provide command-line arg --install-config <filename>
to install config then exit, so without packaging with keynavrc
default config, and release single executable like before
keynavish was not developed with multi-display support in mind.
A good start would be to figure out to what extent it's broken on systems with more than one display, and make a list of what needs to be fixed.
I didn't implement this because it would require fairly big changes to the code and I'm wondering if anyone actually uses it.
If you use keynav and use the grid-nav
command, please add a comment or a thumbs up.
To be compatible with keynav, key names in key bindings are inherited from X. The current list of keys is enough to support the (built-in) default configuration and the example keynavrc
, but it's far from complete.
The key name translation function is essentially just a big messy switch
statement and should probably be refactored first.
List of X keysyms (remove XK_
prefix): keysymdef.h
List of Windows virtual-key codes: winuser.h documentation
(Note that it's not a perfect one-to-one mapping.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.