📄 sakey.bas
字号:
Attribute VB_Name = "Sakey"
Option Explicit
Public Declare Function ReleaseCapture Lib "user32" () As Long
Public Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetDCOrgEx Lib "gdi32" (ByVal hDC As Long, lpPoint As POINTAPI) As Long
Public Declare Function GetKeyboardState& Lib "user32" (pbKeyState As Byte)
Public Declare Function GetKeyNameText& Lib "user32" Alias "GetKeyNameTextA" (ByVal lParam As Long, ByVal lpBuffer As String, ByVal nSize As Long)
Public Declare Function MapVirtualKey& Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long)
Public Declare Function GetAsyncKeyState% Lib "user32" (ByVal vKey As Long)
Public Declare Function SetWindowWord& Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long)
Public Declare Function GetKeyState% Lib "user32" (ByVal nVirtKey As Long)
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Public Const GWL_HWNDPARENT& = (-8)
Public Const HOTKEYF_SHIFT = &H1
Public Const HOTKEYF_CONTROL = &H2
Public Const HOTKEYF_ALT = &H4
Public Const VK_CONTROL& = &H11
Public Const VK_SHIFT& = &H10
Public Const VK_MENU& = &H12
Public Type POINTAPI
X As Long
Y As Long
End Type
Public Sub keytwo(KeyCode As Integer, Shift As Integer)
On Error Resume Next
If (KeyCode = 123) Then
If fullscreen = True Then
Unload Ascreen
Else
Ascreen.Show
End If
End If
Dim de(2) As Byte
de(0) = Shift
de(1) = KeyCode
de(2) = 0
Rscreen.Scmnet7.SendData de
End Sub
Public Sub keyone(KeyCode As Integer, Shift As Integer)
On Error Resume Next
Dim de(2) As Byte
de(0) = Shift
de(1) = KeyCode
de(2) = 1
Rscreen.Scmnet7.SendData de
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -