zsims / hunt-and-peck

Simple vimium/vimperator style navigation for Windows applications based on the UI Automation framework.
621 stars 54 forks source link

Doesn't seem to work on Windows 10 #20

Closed sebnil closed 4 years ago

sebnil commented 4 years ago

Starting the hap.exe with double click. Settings are all empty: image

Shortcut doesn't do anything. But maybe this is due to using a Swedish keyboard so I try to start from cmd instead: hap.exe /hint

Nothing happens.

liuxilu commented 4 years ago

It does work on win10. The default shortcut is alt+; and it can't be set. The program will only affect the currently focused window, that means when you start from cmd nothing will haappen as there's nothing to click on the focused cmd window. You should run /hint from something like ahk.

liuxilu commented 4 years ago

You can just modify the hotkey using dnSpy. In hap.exe\HuntAndPeck.ViewModels\ShellViewModel\.ctor there are two lines

Keys = Keys.OemSemicolon,
Modifier = KeyModifier.Alt
psxvoid commented 4 years ago

When Evernote for windows is active AND I try to use this shortcut then an exception is being thrown: image

The full exception's log ``` See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at HuntAndPeck.Services.UiAutomationHintProviderService.EnumElements(IntPtr hWnd) in C:\projects\hunt-and-peck\src\HuntAndPeck\Services\UiAutomationHintProviderService.cs:line 116 at HuntAndPeck.Services.UiAutomationHintProviderService.EnumWindowHints(IntPtr hWnd, Func`4 hintFactory) in C:\projects\hunt-and-peck\src\HuntAndPeck\Services\UiAutomationHintProviderService.cs:line 63 at HuntAndPeck.Services.UiAutomationHintProviderService.EnumHints(IntPtr hWnd) in C:\projects\hunt-and-peck\src\HuntAndPeck\Services\UiAutomationHintProviderService.cs:line 32 at HuntAndPeck.Services.UiAutomationHintProviderService.EnumHints() in C:\projects\hunt-and-peck\src\HuntAndPeck\Services\UiAutomationHintProviderService.cs:line 23 at HuntAndPeck.ViewModels.ShellViewModel._keyListener_OnHotKeyActivated(Object sender, EventArgs e) in C:\projects\hunt-and-peck\src\HuntAndPeck\ViewModels\ShellViewModel.cs:line 61 at HuntAndPeck.Services.KeyListenerService.WndProc(Message& m) in C:\projects\hunt-and-peck\src\HuntAndPeck\Services\KeyListenerService.cs:line 78 at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- hap Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Files/Portable/hunt-n-peck/hap.exe ---------------------------------------- PresentationFramework Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll ---------------------------------------- WindowsBase Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- PresentationCore Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll ---------------------------------------- System.Xaml Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll ---------------------------------------- Interop.UIAutomationClient Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Files/Portable/hunt-n-peck/Interop.UIAutomationClient.DLL ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4042.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- HuntAndPeck.NativeMethods Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Files/Portable/hunt-n-peck/HuntAndPeck.NativeMethods.DLL ---------------------------------------- Hardcodet.Wpf.TaskbarNotification Assembly Version: 1.0.5.0 Win32 Version: 1.0.5.0 CodeBase: file:///C:/Files/Portable/hunt-n-peck/Hardcodet.Wpf.TaskbarNotification.DLL ---------------------------------------- PresentationFramework-SystemCore Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemCore/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemCore.dll ---------------------------------------- PresentationFramework.Aero2 Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll ---------------------------------------- UIAutomationProvider Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll ---------------------------------------- UIAutomationTypes Assembly Version: 4.0.0.0 Win32 Version: 4.8.4075.0 built by: NET48REL1LAST CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll ---------------------------------------- PresentationFramework-SystemXml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll ---------------------------------------- Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll ---------------------------------------- Windows.UI Assembly Version: 255.255.255.255 Win32 Version: 10.0.10011.16384 CodeBase: file:///C:/WINDOWS/SysNative/WinMetadata/Windows.UI.winmd ---------------------------------------- Windows.Foundation Assembly Version: 255.255.255.255 Win32 Version: 10.0.10011.16384 CodeBase: file:///C:/WINDOWS/SysNative/WinMetadata/Windows.Foundation.winmd ---------------------------------------- System.Runtime.InteropServices.WindowsRuntime Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.InteropServices.WindowsRuntime/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.InteropServices.WindowsRuntime.dll ---------------------------------------- System.Runtime.WindowsRuntime Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.WindowsRuntime/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.WindowsRuntime.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. ```
liuxilu commented 4 years ago

Why not open an new issue?

sebnil commented 4 years ago

Thanks! Got it working.

Such a great application. I really think it would be a nice feature to be able to set the shortcut without running it with autohotkey though.

psxvoid commented 4 years ago

Why not open an new issue?

I haven't tried to understand what is happening under the hood (though, NullReferenceException should be easy to analyze) and thought, it may be related. I may take a look at it someday later a bit closer to add more info for the new issue. Thanks for the idea.

Vijaynrt851 commented 4 years ago

How to exeute the hap.exe file in windows.. is there any pre requisites for installing it.

Does visual studio application is mandatory.

amlmiguel commented 2 years ago

Starting the hap.exe with double click. Settings are all empty: image

Shortcut doesn't do anything. But maybe this is due to using a Swedish keyboard so I try to start from cmd instead: hap.exe /hint

Nothing happens.

Thanks! Got it working.

Such a great application. I really think it would be a nice feature to be able to set the shortcut without running it with autohotkey though.

How did you solved ? I am having the same issue you described...