English
Source / code snippets

intercepting letters normal Tastatureingaben Umlaute

 

Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Tastatureingaben intercepting (Umlaute in normal letters umsetzen)
in the subesquent example becomes the Umsetzen of Umlauten in normalen letters undertaken.
it becomes a Nachrichtenfilterfunktion for The keyboard-Messages through SetWindowsHookEx installs.
tappt im dunkeln heading The thorough keyboard-Messages on The CallBack-routine KbdHookProc circa and evaluates tappt im dunkeln from,
before tappt im dunkeln abgefangen (with Return <> 0) or weitergeleitet (with Return = 0) be.
it go The virtual Key-Codes for The german Umlaute abgefangen and with Keybd_Event in one
entsprechendes Äquivalent umgesetzt.
it go two MultiEdit-Controls on the Window opened, circa To show, that these routine independent
of whom Controls work.
on the end is it necessary, The verkettete routine through UnHookWindwsEx on the end again To . Remove
-Begin-----------------------------------------------------------------
 $H windows.ph
-DeclareVariables----------------------------------------------------
Declare hKbdHook&, Ende&
-HookProc------------------------------------------------------------

Proc KbdHookProc

    Parameters nCode&, wParam&, lParam&
    Declare RetCode&

    If wParam& = 222 Ä

        If lParam& < 0

            ~keybd_event(65, 0, 0, 0)
            ~keybd_event(65, 0, ~KEYEVENTF_KEYUP, 0)
            ~keybd_event(69, 0, 0, 0)
            ~keybd_event(69, 0, ~KEYEVENTF_KEYUP, 0)

        EndIf

        RetCode& = 1

    ElseIf wParam& = 192 Ö

        If lParam& < 0

            ~keybd_event(79, 0, 0, 0)
            ~keybd_event(79, 0, ~KEYEVENTF_KEYUP, 0)
            ~keybd_event(69, 0, 0, 0)
            ~keybd_event(69, 0, ~KEYEVENTF_KEYUP, 0)

        EndIf

        RetCode& = 1

    ElseIf wParam& = 186 Ü

        If lParam& < 0

            ~keybd_event(85, 0, 0, 0)
            ~keybd_event(85, 0, ~KEYEVENTF_KEYUP, 0)
            ~keybd_event(69, 0, 0, 0)
            ~keybd_event(69, 0, ~KEYEVENTF_KEYUP, 0)

        EndIf

        RetCode& = 1

    ElseIf wParam& = 219 ß

        If lParam& < 0

            ~keybd_event(83, 0, 0, 0)
            ~keybd_event(83, 0, ~KEYEVENTF_KEYUP, 0)
            ~keybd_event(83, 0, 0, 0)
            ~keybd_event(83, 0, ~KEYEVENTF_KEYUP, 0)

        EndIf

        RetCode& = 1

    Else

        ~CallNextHookEx(hKbdHook&, nCode&, wParam&, lParam&)
        RetCode& = 0

    EndIf

    Return RetCode&

ENDPROC

---------------------------------------------------------------------
Window Style 27
Cls
hKbdHook& = ~SetWindowsHookEx(~WH_KEYBOARD,
@ProcAddr(KbdHookProc, 3), 0,
~GetWindowThreadProcessID(%hWnd, 0))
@Create(MultiEdit, %hWnd, , 10, 10, 600, 210)
@Create(MultiEdit, %hWnd, , 10, 235, 600, 210)
Clear Ende&

WhileNot Ende&

    WaitInput

    If %Key = 2

        Ende& = 1

    EndIf

EndWhile

~UnHookWindowsHookEx(hKbdHook&)
-End-------------------------------------------------------------------
End
Info: it is with XProfan not possible, systemweit keyboard-Messages abzufangen.
windows expects a suitable routine in of/ one DLL-File.
 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.160 Views

Untitledvor 0 min.
Thomas Freier06/10/22
H.Brill02/12/22
RudiB.02/26/20
rquindt03/23/19
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie