English
Forum

Hotkey Edit with all Scankeys

 
- Page 1 -



Julian
Schmidt
Hi,
i'm on the Search to a Hotkey-Edit the so well How any Scankeys untestützt.
Def CreateHotkeyEdit(5) Control("msctls_hotkey32","",$54010200,&(2),&(3),&(4),&(5),&(1),2000,%hinstance)
Def SetHotKey(3)   SendMessage(&(1),1025,MakeWord(%(2),%(3)),0)
Def GetHotKey(1)   SendMessage(&(1),1026,0,0)
Def GetKey(1)      LoWord(Lobyte(SendMessage(&(1),1026,0,0)))
Def GetModifyer(1) LoWord(Hibyte(SendMessage(hk&,1026,0,0)))
Def MakeWord(2) (%(1) & $FF) | ((%(2) & $FF) << 8)
Def HiByte(1) %(1) >> 8
Def LoByte(1) %(1) & $FF
Window Title "Tastenkombinationionen"
Cls
Var hk& = CreateHotkeyEdit(%hwnd,300,10,250,24)
SetHotKey(hk&,65,4)

While 1

    SetFocus(hk&)
    WaitInput
    Cls
    Print "Du have association:          "
    Print
    Print "Taste     ", GetKey(hk&)
    Print "Modifyer  ", GetModifyer(hk&)

EndWhile


in the example can the input-area z.B. not pressure bypass.

Greeting
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/23/13  
 



 
- Page 2 -


« this Posting watts as Solution marked. »

- Page 4 -



Julian
Schmidt
Wow, with the Edit get one really any Kombinationen there. thanks iF. class thing.

here again with recognition all Keys and Readonly-Edit
 {$iq}
declare Edit&,kbdlist&
windowstyle 16
cls
userMessages wm_user+1234
Edit& = @Create("Edit", %hWnd, "", 10, 10, 200, 24)
SendMessage(Edit&,$00CF,1,0)
kbdlist&=createKbdList()
initMyHook()

do{

    waitInput

}

nProc initMyHook{

    return SetWindowsHookEx(13,procAddr(myLowLevelKeyboardHookProc),getModuleHandle(0),0)/*WH_KEYBOARD_LL*/

}

nProc myLowLevelKeyboardHookProc(long code,wp,lp){

    global edit&,kbdlist&

    ifnot long(lp,8)==128 {

        code=long(lp,0)
        string mor

        ifnot code>159 or code==16 or code==17 or code==18 {

            case iskey(vk_shift) : mor=mor+"Shift + "
            case iskey(vk_control) : mor=mor+"Strg + "
            case iskey(vk_menu) : mor=mor+"Alt + "

        }

        setText(edit&,mor+substr(getString(kbdlist&,selectString(kbdlist&,0,st(code))),2," "))

    }

    CallNextHookEx(0, code, wp, lp)

}

nProc selectString(long lb,srcFrom,string src){

    return sendMessage(lb,lb_selectString,srcFrom,src)

}

createKbdList{

    long kbdList=create("list",0)
    addString(kbdList,"8 BackSpace")
    addString(kbdList,"9 Tab")
    addString(kbdList,"12 Entfernen")
    addString(kbdList,"13 Return")
    addString(kbdList,"16 Shift")
    addString(kbdList,"17 Strg")
    addString(kbdList,"18 Alt")
    addString(kbdList,"19 Pause")
    addString(kbdList,"20 Caps")
    addString(kbdList,"27 Esc")
    addString(kbdList,"32 Space")
    addString(kbdList,"33 BildHoch")
    addString(kbdList,"34 BildRunter")
    addString(kbdList,"35 Ende")
    addString(kbdList,"36 Pos1")
    addString(kbdList,"37 Links")
    addString(kbdList,"38 Hoch")
    addString(kbdList,"39 Rechts")
    addString(kbdList,"40 Runter")
    addString(kbdList,"41 Select")
    addString(kbdList,"42 Druck")
    addString(kbdList,"43 Execute")
    addString(kbdList,"44 Druck")
    addString(kbdList,"45 Einfg")
    addString(kbdList,"46 Entf")
    addString(kbdList,"47 Hilfe")
    addString(kbdList,"48 0")
    addString(kbdList,"49 1")
    addString(kbdList,"50 2")
    addString(kbdList,"51 3")
    addString(kbdList,"52 4")
    addString(kbdList,"53 5")
    addString(kbdList,"54 6")
    addString(kbdList,"55 7")
    addString(kbdList,"56 8")
    addString(kbdList,"57 9")
    addString(kbdList,"65 A")
    addString(kbdList,"66 B")
    addString(kbdList,"67 C")
    addString(kbdList,"68 D")
    addString(kbdList,"69 E")
    addString(kbdList,"70 F")
    addString(kbdList,"71 G")
    addString(kbdList,"72 H")
    addString(kbdList,"73 I")
    addString(kbdList,"74 J")
    addString(kbdList,"75 K")
    addString(kbdList,"76 L")
    addString(kbdList,"77 M")
    addString(kbdList,"78 N")
    addString(kbdList,"79 O")
    addString(kbdList,"80 P")
    addString(kbdList,"81 Q")
    addString(kbdList,"82 R")
    addString(kbdList,"83 S")
    addString(kbdList,"84 T")
    addString(kbdList,"85 U")
    addString(kbdList,"86 V")
    addString(kbdList,"87 W")
    addString(kbdList,"88 X")
    addString(kbdList,"89 Y")
    addString(kbdList,"90 Z")
    addString(kbdList,"96 0")
    addString(kbdList,"97 1")
    addString(kbdList,"98 2")
    addString(kbdList,"99 3")
    addString(kbdList,"100 4")
    addString(kbdList,"101 5")
    addString(kbdList,"102 6")
    addString(kbdList,"103 7")
    addString(kbdList,"104 8")
    addString(kbdList,"105 9")
    addString(kbdList,"106 *")
    addString(kbdList,"107 +")
    addString(kbdList,"109 -")
    addString(kbdList,"110 ,")
    addString(kbdList,"111 /")
    addString(kbdList,"112 F1")
    addString(kbdList,"113 F2")
    addString(kbdList,"114 F3")
    addString(kbdList,"115 F4")
    addString(kbdList,"116 F5")
    addString(kbdList,"117 F6")
    addString(kbdList,"118 F7")
    addString(kbdList,"119 F8")
    addString(kbdList,"120 F9")
    addString(kbdList,"121 F10")
    addString(kbdList,"122 F11")
    addString(kbdList,"123 F12")
    addString(kbdList,"124 F13")
    addString(kbdList,"125 F14")
    addString(kbdList,"126 F15")
    addString(kbdList,"127 F16")
    addString(kbdList,"128 F17")
    addString(kbdList,"129 F18")
    addString(kbdList,"130 F19")
    addString(kbdList,"131 F20")
    addString(kbdList,"132 F21")
    addString(kbdList,"133 F22")
    addString(kbdList,"134 F23")
    addString(kbdList,"135 F24")
    addString(kbdList,"160 Shift")
    addString(kbdList,"161 Shift")
    addString(kbdList,"162 Strg")
    addString(kbdList,"163 Strg")
    addString(kbdList,"164 Alt")
    addString(kbdList,"165 Alt")
    return kbdList

}

 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
02/20/13  
 




Julian
Schmidt
nothing, only goes loudly your testimony this not. only by XPSE or Registerhotkey in a Loop, what with several Edits but potenziell problematically is.

iF (23.01.13)
iF (23.01.13)
Mach still not so tricky separate simply one readonly Edit filled with everything
what with getfocus one globaler Tastaturhook abliefert.
directly befüllen with Einträgen from such list:  [...]   [...] 


Julian Schmidt (23.01.13)
How Dou you mean with the a global keyboard Hook.
can you an example with reinen XProfan give.


iF (23.01.13)
Absturzsicher does it with reinem Profan not -
absturzsichere Hooks were with one reason for nProcs:  [...] 



[OFFTOPIC]If one several quotes nested, go The Parameter from the first internal Quote on the außere Quote transfer.[/OFFTOPIC]
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/30/13  
 



I Have you still supra written How You The Drucktaste mere with XProfan
intercepting can and all the rest of them Keys by HotKey.

my response, the it only with XPSE absturzsicher goes, related on your
question to keyboard-Hook. not to confuse let!
 
01/30/13  
 




Julian
Schmidt
OK, was really something verwirrend.
can you again accurate describe How?
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/30/13  
 



here's still one not-xpse-code thereby the shows How one these Button abfängt:  [...] 

others Keys can You too by addHotKey intercepting.

so müsstest You still any Keys intercepting can.
 
01/30/13  
 




Julian
Schmidt
then should I means any in a Loop cut. there most trouble is, that I for each Hotkey The Opportunities Strg, old, Invoice values, Strg+old, Strg+Invoice values, old+Invoice values, Strg+old+Invoice values + Hotkey need. then be I time integrally quick with 500 Schleifendruchläufen with Addhotkey
time another question, Why The pressure-Button not by Addhotkey. or. Why not any by RegisterHotKey?
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/30/13  
 



If you addHotKey use want then must You einmalig any Register.

rather would imho a small hookProc The same these Tasteninfos z.B. by userMessage
on the XProfan-Program absendet so the program quasi only yet einsammeln
and react must. the example moreover is indeed here  [...]  abrufbar -
So the is the first View source. there get quasi same to Message The Tasteninfo
included.

so such code however 100% absturzsicher functions and your XProfan-Program
not confusion bring, is it necessary, that The Hook-Proc not a
interpretierte Proc shows, because XProfan not apc-sure is. the one as XProfan
into enjoyment such functions come can without that the program crashes,
was with one reason for n(ative)Procs, The even very something like make possible
and thread as well as apc-sure are. The thought was hold, that one too such
items with his Lieblingsprogrammiersprache (XProfan) program can
and the nProcs make possible hold the one even for something like not another
Programming-Language zurückgreifen must separate one How dwelt xprofant.

for nProcs simply xpse with in that Kompilerverzeichnis copy and the IDE
as Compiler or tool indicate, appeal simply xpse file -
into head the xprf simply {$cleq} (kompilieren, left, exe, quiet) write and
already flitzt the program.
 
01/30/13  
 




Julian
Schmidt
OK, will be me time look at. Evtl. too in combination with XPSE.

[OFFTOPIC]was straight on your the XPSE-Website [...] . supra standing copyright © 1998-2011 XProfan.com, built DE. objectively write we already the year 2013 [/OFFTOPIC]
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/31/13  
 




Julian
Schmidt
i will the example with Hook again aufgreifen. [...] 
there existing The row:
caseof wm_user+1234

if (&ulParam==1) and (&uwParam==44)


with &uwParam deals itself around the virtual Tastecode / Scankey. where deals it with &ulParam. thought first it deals itself around the Modifier, the schein though not so To his!?
How can I a Modifier, about old, with inquire.
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
02/19/13  
 



look The nProc GetControlParas (B The Hook-Calls in SendMessage circa,
these against receiving the XProfan-Program as User Messages.

sendMessage(hWnd,wm_user+1234,long(lp,0),long(lp,8))

windows sends 3 Params on The Hookproc: (long code,wp,lp)  [...] 

lParam [in]. Type: LPARAM, A pointer to a KBDLLHOOKSTRUCT structure:  [...] 

Therefore fetch I with long(lp,0): vkCode, Type: DWORD, A virtual-key code:  [...] 

and long(lp,8): flags,Type: DWORD, The extended-key flag, event-injected flag:  [...] 

Therefore standing The from you desired Info nirgends or. becomes tappt im dunkeln self-contained
as Message before sent, means z.B. if old or strg pressed watts.
You müsstest therefore self "merken" whether a the Keys before pressed o.
losgelassen watts. whether losgelassen or pressed standing in &ulParam.

there would it for your drop Perhaps rather, if you in the nProc what änderst
and instead of for &lParam in the SendMessage not long(lp,8) send separate
same with isKey (  [...]  ) ermittelte values send and for Perhaps on The Info
verzichtest, whether The Button pressed or losgelassen watts.

means vlt. so:
 {$cleq}
windowstyle 16
cls
userMessages wm_user+1234
initMyHook()

do{

    waitInput

    select uMessage

        caseof wm_user+1234

        print &uwParam,&ulParam

    endSelect

}

nProc initMyHook{

    return SetWindowsHookEx(13,procAddr(myLowLevelKeyboardHookProc),getModuleHandle(0),0)/*WH_KEYBOARD_LL*/

}

nProc myLowLevelKeyboardHookProc(long code,wp,lp){

    casenot long(lp,8) : casenot (long(lp,0)==162) : sendMessage(hWnd,wm_user+1234,long(lp,0),iskey(VK_CONTROL)*2+iskey(VK_MENU))/* if Button pressed instead of losgelassen *//* not übermitteln if only The strg Key pressed */
    CallNextHookEx(0, code, wp, lp)

}

 
02/19/13  
 




Andreas
Miethe


Hello David,

on these manner blockierst You z.B. my Snapshot-Program. rather The Message transmit.
 
XProfan X2
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
02/19/13  
 



is correct, thanks, my Error.

I korrigiere the too same time here:  [...] 
 
02/19/13  
 




Julian
Schmidt
at that Perform your Quelltextes [...]  comes a warning.
can I these Überspringen or How I get these removes, around the View source to execute?

iF (19.02.13)
there would it for your drop Perhaps rather, if you in the nProc what änderst
and instead of for &lParam in the SendMessage not long(lp,8) send separate
same with isKey ( [...] ) ermittelte values send and for Perhaps on The Info
verzichtest, whether The Button pressed or losgelassen watts.


then should I me but immernoch The vorhergedrückten Keys remember, or?
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
02/19/13  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

46.275 Views

Untitledvor 0 min.
Member 504445902/14/25
H.Brill08/30/21
Walter07/01/18
Andreas Koch11/07/16
More...

Themeninformationen



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