microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.63k stars 6.46k forks source link

Doesn't work with harmony hub keyboard shortcuts #12447

Open thatkookooguy opened 3 years ago

thatkookooguy commented 3 years ago

Microsoft PowerToys version

0.41.4

Running as admin

Area(s) with issue?

Keyboard Manager

Steps to reproduce

  1. Click on Remap a shortcut
  2. Add a new shortcut by clicking on Type to send the shortcut using the harmony hub
  3. click on send Ctrl+Alt+0 and see that powertoys finds Ctrl(right)+Alt(right)+0 3.1. (optional) change the shortcut to Ctrl+Alt+0
  4. remap it to Alt+Shift+S
  5. save it

✔️ Expected Behavior

Keyboard shortcut should be remapped when triggered through the harmony hub

❌ Actual Behavior

When using the harmony hub to rerun the keyboard shortcut, the shortcut doesn't actually trigger the remap.

I can see the ctrl+alt+0 being pressed in a keyboard tester online, but the plexHTPC application does not receive the alt+shift+s

when using a regular keyboard, the remap does actually trigger

Other Software

Harmony Hub android app for testing

mykhailopylyp commented 3 years ago

@Thatkookooguy Thank you for reporting it. Can you try to disable and enable the Keyboard Manager and verify if it fixes the issue?

image

thatkookooguy commented 3 years ago

Tried disabling and enabling back the keyboard manager but the problem persists. Also tried changing the combination to Ctrl(right)+Shift(right)+a just to make sure it's not that specific combination that is messed up.

Maybe it's related to how long the press is? or the release time after the press? What's weird is that the Type button totally recognizes the ctrl(right)+shift(right)+a, but the application doesn't trigger the remap from the same device that wrote I used for the Type key.

thatkookooguy commented 3 years ago

Tested this with Carnac to see the keyboard shortcuts.

Notice that the keyboard shortcut entered with the Harmony Hub is not processed (Carnac sees just the keyboard shortcut harmony hub is sending), while the 2nd scenario, where I use a regular Bluetooth keyboard, **does trigger the remap and you can see it in the Carnac print to screen.

https://user-images.githubusercontent.com/10427304/126533448-1cf2dfef-64fc-428c-bde2-0777d7464ce5.mp4

my keyboard mapper configuration:

image

thatkookooguy commented 3 years ago

tried implementing the same logic like I configured in PowerToys in AutoHotkey and that works with harmony hub keyboard shortcuts. So it's definitely something weird in how PowerToys is processing the shortcut.

Here's the AutoHotkey code for reference:

#MenuMaskKey vk07
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; ======================= ;
; Decrease subtitle delay ;
; ======================= ;
!^0::
IfWinActive, Plex HTPC
{
  Sleep, 350
  Send {Blind}{Alt down}{Shift down}s{Alt up}{Shift up}
  return
}

; ======================= ;
; Increase subtitle delay ;
; ======================= ;
!^1::
IfWinActive, Plex HTPC
{
  Sleep, 350
  Send {Blind}{Alt down}s{Alt up}
  return
}

; ======================= ;
; Decrease audio delay ;
; ======================= ;
!^2::
IfWinActive, Plex HTPC
{
  Sleep, 350
  Send {Blind}{Alt down}{Shift down}a{Alt up}{Shift up}
  return
}

; ======================= ;
; Increase audio delay ;
; ======================= ;
!^3::
IfWinActive, Plex HTPC
{
  Sleep, 350
  Send {Blind}{Alt down}a{Alt up}
  return
}
mykhailopylyp commented 3 years ago

@Thatkookooguy Sorry for the long reply. Would you be able to install a private unsigned build to help us troubleshoot the issue?

thatkookooguy commented 3 years ago

@mykhailopylyp sure. You can send it to me at neilkalman@gmail.com

mykhailopylyp commented 3 years ago

@Thatkookooguy

Thank you!