=begin
屏蔽按键
作者:秀秀
使用方法: 1. Maskkey.mask (屏蔽按键)
2. Maskkey.maskAllKey (屏蔽所有按键)
3. Maskkey.stopMask (恢复按键)
=end
module Maskkey
# 默认屏蔽 F1,F2
# 需要屏蔽其他按键自行加入即可(ASCII码)
F1 = 0x70
F2 = 0x71
F12 = 0x7B
KeyCode = [F1,F2,F12]
Mask = Win32API.new("MaskKey.dll","StartMaskKey","pii","i")
StopMask = Win32API.new("MaskKey.dll","StopMaskKey","v","v")
def self.mask
Mask.call(KeyCode.pack("L*"),12,0)
end
def self.maskAllKey
Mask.call("",0,1)
end
def self.stopMask
StopMask.call
end
end
=begin
屏蔽按键
作者:秀秀
使用方法: 1. Maskkey.mask (屏蔽按键)
2. Maskkey.maskAllKey (屏蔽所有按键)
3. Maskkey.stopMask (恢复按键)
=end
module Maskkey
# 默认屏蔽 F1,F2
# 需要屏蔽其他按键自行加入即可(ASCII码)
F1 = 0x70
F2 = 0x71
F12 = 0x7B
KeyCode = [F1,F2,F12]
Mask = Win32API.new("MaskKey.dll","StartMaskKey","pii","i")
StopMask = Win32API.new("MaskKey.dll","StopMaskKey","v","v")
def self.mask
Mask.call(KeyCode.pack("L*"),12,0)
end
def self.maskAllKey
Mask.call("",0,1)
end
def self.stopMask
StopMask.call
end
end