Register
4coder»Forums»How to get item pressed by keyboard
Adrien
5 posts
How to get item pressed by keyboard
2 months, 2 weeks ago Edited by Adrien on Aug. 26, 2019, 8:49 a.m. 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
680 posts
How to get item pressed by keyboard
2 months, 2 weeks ago Edited by Simon Anciaux on Aug. 27, 2019, 10:14 a.m. 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
5 posts
How to get item pressed by keyboard
2 months, 2 weeks ago
Yes I don't see Lister_State thank you !