Ignore:
Timestamp:
2019-05-18T06:42:01Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
a8171b86
Parents:
95f603c
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-05-16 09:46:12)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-05-18 06:42:01)
Message:

Keyboard layouts can now identify itself

The structure layout_ops_t has been extended with the
parameter get_name() which returns the name of the kb layout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/layout/us_dvorak.c

    r95f603c rf9edc7b  
    4848static void us_dvorak_destroy(layout_t *);
    4949static wchar_t us_dvorak_parse_ev(layout_t *, kbd_event_t *ev);
     50static const char *us_dvorak_name(void);
    5051
    5152static const layout_ops_t layout_intern = {
    5253        .create = us_dvorak_create,
    5354        .destroy = us_dvorak_destroy,
    54         .parse_ev = us_dvorak_parse_ev
     55        .parse_ev = us_dvorak_parse_ev,
     56        .get_name = us_dvorak_name
    5557};
    5658
     
    6567layout_ops_t layout_active = layout_intern;
    6668#endif
     69
     70static const char *us_dvorak_name(void)
     71{
     72        return "us_dvorak";
     73}
    6774
    6875static wchar_t map_lcase[] = {
Note: See TracChangeset for help on using the changeset viewer.