FatalBulletHit

Key Values

Oct 23rd, 2019 (edited)
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # https://pastebin.com/FdSGYC97
  2. # Returns Key and KeyChar for the pressed key
  3.  
  4. $Host.UI.RawUI.WindowTitle = 'Key Values'
  5.  
  6. while ($true) {
  7.  
  8.     "Key: {0}" -f  ($Key = ([System.Console]::ReadKey('NoEcho'))).Key
  9.     "KeyChar: {0}" -f $Key.KeyChar
  10.  
  11. }
Add Comment
Please, Sign In to add comment