Get Keys from a ShortCut

后端 未结 3 813
独厮守ぢ
独厮守ぢ 2020-12-21 12:34

Is there another way of getting the Keys from a Shortcut besides

sc is of type System.Windows.Forms.Shortcut

var k = (Keys)sc;
         


        
3条回答
  •  忘掉有多难
    2020-12-21 13:04

    I have solved this using the ABL .NET bridge by comparing the result of the System.Windows.Forms.Shortcut's value GetHashValue() to the e:KeyData:GetHGashValue() in an KeyDown event handler.

提交回复
热议问题