解决了之前yangff的难题。。。 =begin 屏蔽按键 作者:秀秀 使用方法: 1. Maskkey.mask (屏蔽按键) 2. Maskkey.maskAllKey (屏蔽所有按键) 3. Maskkey.stopMask (恢复按键) =end module Maskkey # 默认屏蔽 F1,F2 # 需要屏蔽其他按键自行加入即可(ASCII码) F1 = 0x70 F2 = 0x71 KeyCode = [F1,F2] Mask = Win32API.new("MaskKey.dll","StartMaskKey","pii","i") StopMask = Win32API.new("MaskKey.dll","StopMaskKey","v","v") def self.mask Mask.call(KeyCode.pack("L*"),KeyCode.length,0) end def self.maskAllKey Mask.call("",0,1) end def self.stopMask StopMask.call end end
|
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-27 21:50
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.