Notes
Notes - notes.io |
Imports System.Reflection
Imports System.Drawing
Imports System.Threading
Module Klavye
Public KalkanRengi As Integer
Public Structure KBDLLHOOKSTRUCT
Public vkCode As Integer
Public scanCode As Integer
Public flags As Integer
Public time As Integer
Public dwExtraInfo As Integer
End Structure
Public Declare Function UnhookWindowsHookEx Lib "user32" _
(ByVal hHook As Integer) As Integer
Public Declare Function SetWindowsHookEx Lib "user32" _
Alias "SetWindowsHookExA" (ByVal idHook As Integer, _
ByVal lpfn As KeyboardHookDelegate, ByVal hmod As Integer, _
ByVal dwThreadId As Integer) As Integer
Private Declare Function GetAsyncKeyState Lib "user32" _
(ByVal vKey As Integer) As Integer
Private Declare Function CallNextHookEx Lib "user32" _
(ByVal hHook As Integer, ByVal nCode As Integer, _
ByVal wParam As Integer, ByVal lParam As KBDLLHOOKSTRUCT) As Integer
Private Const HC_ACTION As Integer = 0
Private Const WH_KEYBOARD_LL As Integer = 13&
Public KlavyeHND As Integer
Public Function BagliMi(ByRef Hookstruct As KBDLLHOOKSTRUCT) As Boolean
Select Case Hookstruct.vkCode
Case 41 To &H5A
Return False 'A-Z harfler
Case 8
Return False 'geri tuşu
Case 14
Return False 'Capslock tuşu
Case &HD
Return False 'Enter tuşu
Case 20
Return False 'Boşlık tuşu çalışmaz
Case 25, 26, 27, 28
Return False 'Tüm 4 Ok tuşları, ESC
Case 2D
Return False 'INS tuşu
Case &H6E
Return False
Case &H7A
Return False 'F11
Case &H7B
Return False 'F12
End Select
Return True
End Function
Public Function KlavyeGeriAl(ByVal Code As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer
If (Code = HC_ACTION) And (BagliMi(lParam)) Then
Return 1
End If
Return CallNextHookEx(KlavyeHND, Code, wParam, lParam)
End Function
Public Delegate Function KeyboardHookDelegate(ByVal Code As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer
<MarshalAs(UnmanagedType.FunctionPtr)> Private callback As KeyboardHookDelegate
Public Sub KlavyeyiBagla()
callback = New KeyboardHookDelegate(AddressOf KlavyeGeriAl)
KlavyeHND = SetWindowsHookEx(WH_KEYBOARD_LL, callback, _
Marshal.GetHINSTANCE([Assembly].GetExecutingAssembly.GetModules()(0)).ToInt32, 0)
End Sub
Private Function Hooked()
Hooked = KlavyeHND <> 0
End Function
Public Sub UnhookKeyboard()
If (Hooked()) Then
Call UnhookWindowsHookEx(KlavyeHND)
End If
End Sub
End Module
|
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team