4coder»Forums
Adrien
6 posts
How to get item pressed by keyboard
Edited by Adrien on Reason: Initial post
Hello I find this
1
2
tatic UI_Item
lister_get_clicked_item(Application_Links *app, View_Summary *view, Partition *scratch)
for the mouse but I don't find for the keyboard
Simon Anciaux
1337 posts
How to get item pressed by keyboard
Edited by Simon Anciaux on Reason: typo
I've never written a custom lister, but I think you're supposed to set an Activation Handler that will be called when an item is activated (either by mouse or keyboard). The function has an activated_by_mouse parameter. It's from 4coder_ui_helper.h and there are examples of custom uis in 4coder_lists.cpp.

1
2
3
typedef void Lister_Activation_Function_Type(Application_Links *app, Partition *scratch, Heap *heap,
                                             View_Summary *view, struct Lister_State *state,
                                             String text_field, void *user_data, bool32 activated_by_mouse);
Adrien
6 posts
How to get item pressed by keyboard
Yes I don't see Lister_State thank you !