c# - word add-in, KeyDown handling on combobox in customui -
blockquote
need customui in word add-in. have
<combobox />
in custom ui.
how can handle enter pressing user ?
need perform actions when user presses enter in combobox
. can add keydown
event somehow or maybe cast iribboncontrol
useful?
update :
made decision not include functionality. still interested in solution problem.
even windowselectionchange event wont you. works other key press not enter , backspace (as aware of).
you have use low level keyboard hook
edited**
there callback when of key been pressed called.
private static intptr hookcallback( int ncode, intptr wparam, intptr lparam) { if (ncode >= 0 && wparam == (intptr) wm_keydown) { int vkcode = marshal.readint32(lparam); //check if enter key pressed if (vkcode == (int) keys.enter ) // here whatever need } return callnexthookex(_hookid, ncode, wparam, lparam); }
Comments
Post a Comment