EVEMyMultilineTextEditBoxWidget// Watermark text field
(
kMyeditboxWidgetID, // WidgetId
kSysEditBoxPMRsrcId, // RsrcId
kBindLeft | kBindRight ,
Frame(0,0,200,200) // Frame
kTrue, kTrue, // Visible, Enabled
0, // widget id of nudge button
1, // small nudge amount
10, // large nudge amount
0, // max num chars(0 = no limit)
kFalse, // is read only
kTrue, // should notify each key stroke (NEW)
kFalse, // range checking enabled
kFalse, // blank entry allowed
0,
0, // upper/lower bounds
"", // initial text
kEVENoSpaceAfter| kEVEAlignFill,
),
this is my editbox code at .fr. and I develop plugin at windows
Differences:
kBindNone
large nudge = 0
upper bounds = 100
notify keystrokes = false
Plenty speculation ahead:
My guess is the notify keystrokes flag. kTrue is rare in the SDK examples, and I doubt it is intentional for kSpellAlternativeEditBoxID. Could be the key strokes are absorbed with this flag.
Given the (NEW) comment, I assume you copied it from kPDFVTUIDataSourceFileTextWidgetID or kWatermarkUIEditBoxWidgetID. Have you tried with false as I already suggested above?
Otherwise it could be some extra setup code, maybe using a private Drover call. Once upon a time IControlView had a getter for the SysControl / HWND so we could look at the Windows side, but that's gone. If I were desperate I'd try Windows API such as EnumChildWindows() and dig deeper from there.
If you only need the key strokes to update a related display, you could also watch InDesign's events. To learn about focus / blur, observe your kMyeditboxWidgetID for protocol IID_IEVENTHANDLER, message is kEditBoxGetKeyFocusMessage or kEditBoxGiveUpKeyFocusMessage. Between those, register/unregister an IEventWatcher at IEventDispatcher. Works at least here on the Mac.
There is also a very old "filter" programming pattern to subclass the boss class, move the event handler implementation to another IID (any of yours will do) and provide your own event handler that passes on most calls. Somewhere deep in the SDK it is mentioned that event handlers are discouraged, so you better also stay away from that.