mirror of
https://git.planet-casio.com/Lephenixnoir/JustUI.git
synced 2025-06-06 05:25:10 +02:00
recognize KEY_OK as equivalent to KEY_EXE
This commit is contained in:
parent
ccb5feae04
commit
334be52cee
3 changed files with 3 additions and 3 deletions
|
@ -541,7 +541,7 @@ static bool jfileselect_poly_event(void *fs0, jevent e)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(key == KEY_EXE && fs->entries) {
|
else if((key == KEY_EXE || key == KEY_OK) && fs->entries) {
|
||||||
struct fileinfo *finfo = fs->entries;
|
struct fileinfo *finfo = fs->entries;
|
||||||
struct fileinfo *i = &finfo[fs->cursor];
|
struct fileinfo *i = &finfo[fs->cursor];
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ static bool jinput_poly_event(void *i0, jevent e)
|
||||||
|
|
||||||
if(ev.type != KEYEV_DOWN) return false;
|
if(ev.type != KEYEV_DOWN) return false;
|
||||||
|
|
||||||
if(ev.key == KEY_EXE) {
|
if(ev.key == KEY_EXE || ev.key == KEY_OK) {
|
||||||
jevent e = { .source = i, .type = JINPUT_VALIDATED };
|
jevent e = { .source = i, .type = JINPUT_VALIDATED };
|
||||||
jwidget_emit(i, e);
|
jwidget_emit(i, e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ static bool jlist_poly_event(void *l0, jevent e)
|
||||||
|
|
||||||
/* Triggering items */
|
/* Triggering items */
|
||||||
|
|
||||||
if(key == KEY_EXE && l->items[l->cursor].triggerable) {
|
if((key == KEY_EXE || key == KEY_OK) && l->items[l->cursor].triggerable) {
|
||||||
jevent e = { .type = JLIST_ITEM_TRIGGERED, .data = l->cursor };
|
jevent e = { .type = JLIST_ITEM_TRIGGERED, .data = l->cursor };
|
||||||
jwidget_emit(l, e);
|
jwidget_emit(l, e);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue