Changeset 7061664 in pugl


Ignore:
Timestamp:
Oct 3, 2017, 7:20:52 AM (7 weeks ago)
Author:
David Robillard <d@…>
Branches:
master
Children:
39ad849
Parents:
7a05b7c
git-author:
David Robillard <d@…> (07/23/17 02:16:04)
git-committer:
David Robillard <d@…> (10/03/17 07:20:52)
Message:

Print Unicode code points in standard format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pugl_test.c

    r7a05b7c r7061664  
    157157        break;
    158158    case PUGL_KEY_PRESS:
    159         fprintf(stderr, "Key %u (char %u) press (%s)%s\n",
    160                 event->key.keycode, event->key.character, event->key.utf8,
    161                 event->key.filter ? " (filtered)" : "");
     159        fprintf(stderr, "Key %u (char U+%04X special U+%04X) press (%s)%s\n",
     160                event->key.keycode, event->key.character, event->key.special,
     161                event->key.utf8, event->key.filter ? " (filtered)" : "");
    162162        if (event->key.character == 'q' ||
    163163            event->key.character == 'Q' ||
     
    167167        break;
    168168    case PUGL_KEY_RELEASE:
    169         fprintf(stderr, "Key %u (char %u) release (%s)%s\n",
    170                 event->key.keycode, event->key.character, event->key.utf8,
    171                 event->key.filter ? " (filtered)" : "");
     169        fprintf(stderr, "Key %u (char U+%04X special U+%04X) release (%s)%s\n",
     170                event->key.keycode, event->key.character, event->key.special,
     171                event->key.utf8, event->key.filter ? " (filtered)" : "");
    172172        break;
    173173    case PUGL_MOTION_NOTIFY:
Note: See TracChangeset for help on using the changeset viewer.