hj wrote:
> Press a key, send key_prees_event, convert key value to character, then
> display the character in view.
> Which function convert key value to character?
The call chain will look like this in a Unix build of AbiWord:
1. key_press_event handled in abi/src/af/ev/unix/ev_UnixKeyboard.cpp
2. abi/src/af/ev/unix/ev_UnixKeyboard.cpp
ev_UnixKeyboard::keyPressEvent(AV_View* pView, GdkEventKey* e)
3. abi/src/af/ev/xp/ev_Keyboard.cpp
EV_Keyboard::invokeKeyboardMethod(...)
4. abi/src/wp/ap/xp/ap_EditMethods.cpp
<appropriate handler>
GDK key_press_event is handled by "keyPressEvent", which then calls the
mapper function "invokeKeyboardMethod". "invokeKeyboardMethod" looks
up the "edit method" that belongs to that key press, and calls the handler
function (most of these are stored in abi/src/wp/ap/xp/ap_EditMethods.cpp).
The mapping from key press to event is handled in the file
abi/src/af/ev/xp/ev_EditEventMapper.cpp, in the "Keystroke" function.
I hope this is enough to help you find what you're looking for.
--
Shaw Terwilliger