File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -226,3 +226,4 @@ _SICHINTF
226226RoGetAgileReference
227227IQueryInfo
228228QITIPF_FLAGS
229+ GetKeyboardState
Original file line number Diff line number Diff line change 44using System . Collections . Frozen ;
55using System . Runtime . InteropServices ;
66using System . Text ;
7+ using Windows . Win32 ;
78using Forms = System . Windows . Forms ;
89
910namespace Files . App . Data . Commands
@@ -374,7 +375,7 @@ private static string GetKeyCharacter(Forms.Keys key)
374375 var state = new byte [ 256 ] ;
375376
376377 // Get the current keyboard state
377- if ( ! Win32PInvoke . GetKeyboardState ( state ) )
378+ if ( ! PInvoke . GetKeyboardState ( state ) )
378379 return buffer . ToString ( ) ;
379380
380381 // Convert the key to its virtual key code
Original file line number Diff line number Diff line change @@ -228,11 +228,6 @@ public static extern int ToUnicodeEx(
228228 IntPtr keyboardLayout
229229 ) ;
230230
231- [ DllImport ( "user32.dll" ) ]
232- public static extern bool GetKeyboardState (
233- byte [ ] lpKeyState
234- ) ;
235-
236231 [ DllImport ( "user32.dll" , CharSet = CharSet . Auto ) ]
237232 public static extern IntPtr GetKeyboardLayout
238233 (
You can’t perform that action at this time.
0 commit comments