Commit 1b60fd6d9052598f228454853cee8a45a89b54ac

Thomas de Grivel 2023-11-17T18:52:10

libc3 window cairo quartz demo keyboard

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
diff --git a/Makefile b/Makefile
index a135173..15ba5c0 100644
--- a/Makefile
+++ b/Makefile
@@ -138,12 +138,13 @@ license:
 	update_header Makefile ${C3_MAKEFILES}
 	update_header license.h ${C3_C_SOURCES}
 
+lldb_demo: debug
+	${MAKE} -C libc3 lldb_demo
+
 lldb_ic3: debug
-lldb_ic3:
 	${MAKE} -C ic3 lldb_ic3
 
 lldb_test: debug
-lldb_test:
 	${MAKE} -C test lldb_test
 
 test: build
diff --git a/libc3/Makefile b/libc3/Makefile
index 6d98409..dd3087a 100644
--- a/libc3/Makefile
+++ b/libc3/Makefile
@@ -73,12 +73,15 @@ install:
 libffi:
 	ln -sf "../libffi/${CC_TARGET}" libffi
 
+lldb_demo: debug
+	${MAKE} -C window lldb_demo
+
 test:
 
 update_sources:
 	./update_sources
 
-.PHONY: all asan build clean cov debug distclean gen install test update_sources
+.PHONY: all asan build clean cov debug distclean gdb_demo gen install lldb_demo test update_sources
 
 include config.mk
 include sources.mk
diff --git a/libc3/window/Makefile b/libc3/window/Makefile
index 0ceae7b..2318fdf 100644
--- a/libc3/window/Makefile
+++ b/libc3/window/Makefile
@@ -53,6 +53,9 @@ gdb_demo: debug
 install:
 	if ${HAVE_CAIRO}; then ${MAKE} -C cairo install; fi
 
+lldb_demo: debug
+	if ${HAVE_CAIRO}; then ${MAKE} -C cairo lldb_demo; fi
+
 test:
 	if ${HAVE_CAIRO}; then ${MAKE} -C cairo test; fi
 
diff --git a/libc3/window/cairo/Makefile b/libc3/window/cairo/Makefile
index 19e2891..60cd17e 100644
--- a/libc3/window/cairo/Makefile
+++ b/libc3/window/cairo/Makefile
@@ -64,6 +64,9 @@ install:
 	if ${HAVE_SWIFT}; then ${MAKE} -C quartz install; fi
 	if ${HAVE_XCB}; then ${MAKE} -C xcb install; fi
 
+lldb_demo: debug
+	if ${HAVE_SWIFT}; then ${MAKE} -C quartz lldb_demo; else if ${HAVE_XCB}; then ${MAKE} -C xcb lldb_demo; fi; fi
+
 test:
 	if ${HAVE_SWIFT}; then ${MAKE} -C quartz test; fi
 	if ${HAVE_XCB}; then ${MAKE} -C xcb test; fi
diff --git a/libc3/window/cairo/c3_window_cairo_demo.c b/libc3/window/cairo/c3_window_cairo_demo.c
index 537fe8f..a23e502 100644
--- a/libc3/window/cairo/c3_window_cairo_demo.c
+++ b/libc3/window/cairo/c3_window_cairo_demo.c
@@ -15,10 +15,53 @@
 #include <time.h>
 #include <libc3/c3.h>
 #include <cairo/cairo.h>
+#include <xkbcommon/xkbcommon.h>
 #include "../window.h"
 #include "c3_window_cairo_demo.h"
 #include "types.h"
 
+bool c3_window_cairo_demo_button (s_window_cairo *window, u8 button,
+                                  sw x, sw y)
+{
+  assert(window);
+  (void) window;
+  (void) button;
+  (void) x;
+  (void) y;
+  printf("on_button: %lu (%ld, %ld)\n", (uw) button, x, y);
+  return true;
+}
+
+bool c3_window_cairo_demo_key (s_window_cairo *window, uw keysym)
+{
+  char keysym_name[64];
+  assert(window);
+  (void) window;
+  switch (keysym) {
+  case XKB_KEY_Escape:
+  case XKB_KEY_q:
+    g_c3_exit_code = 0;
+    return false;
+  case XKB_KEY_Left:
+    if (! window_set_sequence_pos((s_window *) window,
+                                  (window->sequence_pos +
+                                   window->sequence_count - 1) %
+                                  window->sequence_count))
+      return false;
+    break;
+  case XKB_KEY_Right:
+    if (! window_set_sequence_pos((s_window *) window,
+                                  (window->sequence_pos + 1) %
+                                  window->sequence_count))
+      return false;
+    break;
+  default:
+    xkb_keysym_get_name(keysym, keysym_name, sizeof(keysym_name));
+    printf("c3_window_cairo_demo_key: %lu %s\n", keysym, keysym_name);
+  }
+  return true;
+}
+
 bool c3_window_cairo_demo_load (s_window_cairo *window)
 {
   assert(window->sequence_count ==
diff --git a/libc3/window/cairo/c3_window_cairo_demo.h b/libc3/window/cairo/c3_window_cairo_demo.h
index f4708a7..a36870b 100644
--- a/libc3/window/cairo/c3_window_cairo_demo.h
+++ b/libc3/window/cairo/c3_window_cairo_demo.h
@@ -18,6 +18,9 @@
 
 #define LIBC3_WINDOW_CAIRO_DEMO_SEQUENCE_COUNT 1
 
+bool c3_window_cairo_demo_button (s_window_cairo *window, u8 button,
+                                  sw x, sw y);
+bool c3_window_cairo_demo_key (s_window_cairo *window, uw keysym);
 bool c3_window_cairo_demo_load (s_window_cairo *window);
 bool c3_window_cairo_demo_render (s_window_cairo *window, cairo_t *cr);
 bool c3_window_cairo_demo_resize (s_window_cairo *window, uw w, uw h);
diff --git a/libc3/window/cairo/quartz/Makefile b/libc3/window/cairo/quartz/Makefile
index 4c7f5be..de7f9b9 100644
--- a/libc3/window/cairo/quartz/Makefile
+++ b/libc3/window/cairo/quartz/Makefile
@@ -54,6 +54,9 @@ distclean:
 gdb_demo: debug
 	${MAKE} -C demo gdb_demo
 
+lldb_demo: debug
+	${MAKE} -C demo lldb_demo
+
 test: build
 	${MAKE} -C demo test
 
diff --git a/libc3/window/cairo/quartz/configure b/libc3/window/cairo/quartz/configure
index 26cbf86..3a22d7c 100755
--- a/libc3/window/cairo/quartz/configure
+++ b/libc3/window/cairo/quartz/configure
@@ -60,6 +60,7 @@ CPPFLAGS="$CPPFLAGS -I../../../../libffi/include -I../../../.."
 config_asan
 config_gnu
 pkg_config cairo
+pkg_config xkbcommon
 LIBS="$LIBS"
 
 # Asan config
diff --git a/libc3/window/cairo/quartz/demo/Makefile b/libc3/window/cairo/quartz/demo/Makefile
index 6062e4e..abafe8e 100644
--- a/libc3/window/cairo/quartz/demo/Makefile
+++ b/libc3/window/cairo/quartz/demo/Makefile
@@ -59,6 +59,9 @@ gcovr:
 gdb_demo: debug
 	if [ -f ${PROG_DEBUG}.core ]; then gdb .libs/${PROG_DEBUG} ${PROG_DEBUG}.core; else gdb .libs/${PROG_DEBUG}; fi
 
+lldb_demo: debug
+	lldb ${APP_PROG_DEBUG}
+
 install:
 	install -m 755 -d ${prefix}/bin
 	install -m 755 ${PROG} ${prefix}/bin/${PROG}
diff --git a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo
deleted file mode 100755
index a0b7e1b..0000000
--- a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo
+++ /dev/null
@@ -1,210 +0,0 @@
-#! /bin/sh
-
-# c3_window_cairo_quartz_demo - temporary wrapper script for .libs/c3_window_cairo_quartz_demo
-# Generated by libtool (GNU libtool) 2.4.7
-#
-# The c3_window_cairo_quartz_demo program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=""
-
-# This environment variable determines our operation mode.
-if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
-  # install mode needs the following variables:
-  generated_by_libtool_version='2.4.7'
-  notinst_deplibs=' ../libc3_window_cairo_quartz.la /Users/thodg/c/thodg/c3-lang/c3/libc3/window/cairo/libc3_window_cairo.la /Users/thodg/c/thodg/c3-lang/c3/libc3/window/libc3_window.la /Users/thodg/c/thodg/c3-lang/c3/libc3/libc3.la /Users/thodg/c/thodg/c3-lang/c3/libffi/libffi.la'
-else
-  # When we are sourced in execute mode, $file and $ECHO are already set.
-  if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
-    file="$0"
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-    ECHO="printf %s\\n"
-  fi
-
-# Very basic option parsing. These options are (a) specific to
-# the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ that is used only on
-# windows platforms, and (c) all begin with the string --lt-
-# (application programs are unlikely to have options that match
-# this pattern).
-#
-# There are only two supported options: --lt-debug and
-# --lt-dump-script. There is, deliberately, no --lt-help.
-#
-# The first argument to this parsing function should be the
-# script's /opt/homebrew/bin/glibtool value, followed by no.
-lt_option_debug=
-func_parse_lt_options ()
-{
-  lt_script_arg0=$0
-  shift
-  for lt_opt
-  do
-    case "$lt_opt" in
-    --lt-debug) lt_option_debug=1 ;;
-    --lt-dump-script)
-        lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'`
-        test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=.
-        lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'`
-        cat "$lt_dump_D/$lt_dump_F"
-        exit 0
-      ;;
-    --lt-*)
-        $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2
-        exit 1
-      ;;
-    esac
-  done
-
-  # Print the debug banner immediately:
-  if test -n "$lt_option_debug"; then
-    echo "c3_window_cairo_quartz_demo:c3_window_cairo_quartz_demo:$LINENO: libtool wrapper (GNU libtool) 2.4.7" 1>&2
-  fi
-}
-
-# Used when --lt-debug. Prints its arguments to stdout
-# (redirection is the responsibility of the caller)
-func_lt_dump_args ()
-{
-  lt_dump_args_N=1;
-  for lt_arg
-  do
-    $ECHO "c3_window_cairo_quartz_demo:c3_window_cairo_quartz_demo:$LINENO: newargv[$lt_dump_args_N]: $lt_arg"
-    lt_dump_args_N=`expr $lt_dump_args_N + 1`
-  done
-}
-
-# Core function for launching the target application
-func_exec_program_core ()
-{
-
-      if test -n "$lt_option_debug"; then
-        $ECHO "c3_window_cairo_quartz_demo:c3_window_cairo_quartz_demo:$LINENO: newargv[0]: $progdir/$program" 1>&2
-        func_lt_dump_args ${1+"$@"} 1>&2
-      fi
-      exec "$progdir/$program" ${1+"$@"}
-
-      $ECHO "$0: cannot exec $program $*" 1>&2
-      exit 1
-}
-
-# A function to encapsulate launching the target application
-# Strips options in the --lt-* namespace from $@ and
-# launches target application with the remaining arguments.
-func_exec_program ()
-{
-  case " $* " in
-  *\ --lt-*)
-    for lt_wr_arg
-    do
-      case $lt_wr_arg in
-      --lt-*) ;;
-      *) set x "$@" "$lt_wr_arg"; shift;;
-      esac
-      shift
-    done ;;
-  esac
-  func_exec_program_core ${1+"$@"}
-}
-
-  # Parse options
-  func_parse_lt_options "$0" ${1+"$@"}
-
-  # Find the directory that this script lives in.
-  thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'`
-  test "x$thisdir" = "x$file" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'`
-  while test -n "$file"; do
-    destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'`
-
-    # If there was a directory component, then change thisdir.
-    if test "x$destdir" != "x$file"; then
-      case "$destdir" in
-      [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
-      *) thisdir="$thisdir/$destdir" ;;
-      esac
-    fi
-
-    file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'`
-    file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'`
-  done
-
-  # Usually 'no', except on cygwin/mingw when embedded into
-  # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
-  if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
-    # special case for '.'
-    if test "$thisdir" = "."; then
-      thisdir=`pwd`
-    fi
-    # remove .libs from thisdir
-    case "$thisdir" in
-    *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;;
-    .libs )   thisdir=. ;;
-    esac
-  fi
-
-  # Try to get the absolute directory name.
-  absdir=`cd "$thisdir" && pwd`
-  test -n "$absdir" && thisdir="$absdir"
-
-  program='c3_window_cairo_quartz_demo'
-  progdir="$thisdir/.libs"
-
-
-  if test -f "$progdir/$program"; then
-    # Add our own library path to DYLD_LIBRARY_PATH
-    DYLD_LIBRARY_PATH="/Users/thodg/c/thodg/c3-lang/c3/libc3/window/cairo/quartz/.libs:/Users/thodg/c/thodg/c3-lang/c3/libc3/window/cairo/.libs:/Users/thodg/c/thodg/c3-lang/c3/libc3/window/.libs:/Users/thodg/c/thodg/c3-lang/c3/libc3/.libs:/Users/thodg/c/thodg/c3-lang/c3/libffi/.libs:$DYLD_LIBRARY_PATH"
-
-    # Some systems cannot cope with colon-terminated DYLD_LIBRARY_PATH
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    DYLD_LIBRARY_PATH=`$ECHO "$DYLD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'`
-
-    export DYLD_LIBRARY_PATH
-
-    if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
-      # Run the actual program with our arguments.
-      func_exec_program ${1+"$@"}
-    fi
-  else
-    # The program doesn't exist.
-    $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2
-    $ECHO "This script is just a wrapper for $program." 1>&2
-    $ECHO "See the libtool documentation for more information." 1>&2
-    exit 1
-  fi
-fi
diff --git a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.c b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.c
index 429adc7..52bc4e9 100644
--- a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.c
+++ b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.c
@@ -18,18 +18,14 @@
 #include "../../c3_window_cairo_demo.h"
 #include "../window_cairo_quartz.h"
 
-static bool on_button (s_window_cairo *window, u8 button,
-                       sw x, sw y);
-static bool on_key (s_window_cairo *window, uw key);
-
 int main (void)
 {
   s_window_cairo window;
   window_cairo_init(&window, 0, 0, 800, 600,
                     "C3.Window.Cairo.Quartz demo",
                     LIBC3_WINDOW_CAIRO_DEMO_SEQUENCE_COUNT);
-  window.button = on_button;
-  window.key    = on_key;
+  window.button = c3_window_cairo_demo_button;
+  window.key    = c3_window_cairo_demo_key;
   window.load   = c3_window_cairo_demo_load;
   window.render = c3_window_cairo_demo_render;
   window.resize = c3_window_cairo_demo_resize;
@@ -37,42 +33,3 @@ int main (void)
     return g_c3_exit_code;
   return 0;
 }
-
-static bool on_button (s_window_cairo *window, u8 button, sw x, sw y)
-{
-  assert(window);
-  (void) window;
-  (void) button;
-  (void) x;
-  (void) y;
-  printf("on_button: %lu (%ld, %ld)\n", (uw) button, x, y);
-  return true;
-}
-
-static bool on_key (s_window_cairo *window, uw key)
-{
-  assert(window);
-  (void) window;
-  switch (key) {
-  case 9:
-  case 38:
-    g_c3_exit_code = 0;
-    return false;
-  case 100:
-    if (! window_set_sequence_pos((s_window *) window,
-                                  (window->sequence_pos +
-                                   window->sequence_count - 1) %
-                                  window->sequence_count))
-      return false;
-    break;
-  case 102:
-    if (! window_set_sequence_pos((s_window *) window,
-                                  (window->sequence_pos + 1) %
-                                  window->sequence_count))
-      return false;
-    break;
-  default:
-    printf("on_key: %lu\n", key);
-  }
-  return true;
-}
diff --git a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_debug b/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_debug
deleted file mode 100755
index 7687f06..0000000
--- a/libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_debug
+++ /dev/null
@@ -1,210 +0,0 @@
-#! /bin/sh
-
-# c3_window_cairo_quartz_demo_debug - temporary wrapper script for .libs/c3_window_cairo_quartz_demo_debug
-# Generated by libtool (GNU libtool) 2.4.7
-#
-# The c3_window_cairo_quartz_demo_debug program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=""
-
-# This environment variable determines our operation mode.
-if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
-  # install mode needs the following variables:
-  generated_by_libtool_version='2.4.7'
-  notinst_deplibs=' ../libc3_window_cairo_quartz_debug.la /Users/thodg/c/thodg/c3-lang/c3/libc3/window/cairo/libc3_window_cairo_debug.la /Users/thodg/c/thodg/c3-lang/c3/libc3/window/libc3_window_debug.la /Users/thodg/c/thodg/c3-lang/c3/libc3/libc3_debug.la /Users/thodg/c/thodg/c3-lang/c3/libffi/libffi.la'
-else
-  # When we are sourced in execute mode, $file and $ECHO are already set.
-  if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
-    file="$0"
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-    ECHO="printf %s\\n"
-  fi
-
-# Very basic option parsing. These options are (a) specific to
-# the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ that is used only on
-# windows platforms, and (c) all begin with the string --lt-
-# (application programs are unlikely to have options that match
-# this pattern).
-#
-# There are only two supported options: --lt-debug and
-# --lt-dump-script. There is, deliberately, no --lt-help.
-#
-# The first argument to this parsing function should be the
-# script's /opt/homebrew/bin/glibtool value, followed by no.
-lt_option_debug=
-func_parse_lt_options ()
-{
-  lt_script_arg0=$0
-  shift
-  for lt_opt
-  do
-    case "$lt_opt" in
-    --lt-debug) lt_option_debug=1 ;;
-    --lt-dump-script)
-        lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'`
-        test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=.
-        lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'`
-        cat "$lt_dump_D/$lt_dump_F"
-        exit 0
-      ;;
-    --lt-*)
-        $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2
-        exit 1
-      ;;
-    esac
-  done
-
-  # Print the debug banner immediately:
-  if test -n "$lt_option_debug"; then
-    echo "c3_window_cairo_quartz_demo_debug:c3_window_cairo_quartz_demo_debug:$LINENO: libtool wrapper (GNU libtool) 2.4.7" 1>&2
-  fi
-}
-
-# Used when --lt-debug. Prints its arguments to stdout
-# (redirection is the responsibility of the caller)
-func_lt_dump_args ()
-{
-  lt_dump_args_N=1;
-  for lt_arg
-  do
-    $ECHO "c3_window_cairo_quartz_demo_debug:c3_window_cairo_quartz_demo_debug:$LINENO: newargv[$lt_dump_args_N]: $lt_arg"
-    lt_dump_args_N=`expr $lt_dump_args_N + 1`
-  done
-}
-
-# Core function for launching the target application
-func_exec_program_core ()
-{
-
-      if test -n "$lt_option_debug"; then
-        $ECHO "c3_window_cairo_quartz_demo_debug:c3_window_cairo_quartz_demo_debug:$LINENO: newargv[0]: $progdir/$program" 1>&2
-        func_lt_dump_args ${1+"$@"} 1>&2
-      fi
-      exec "$progdir/$program" ${1+"$@"}
-
-      $ECHO "$0: cannot exec $program $*" 1>&2
-      exit 1
-}
-
-# A function to encapsulate launching the target application
-# Strips options in the --lt-* namespace from $@ and
-# launches target application with the remaining arguments.
-func_exec_program ()
-{
-  case " $* " in
-  *\ --lt-*)
-    for lt_wr_arg
-    do
-      case $lt_wr_arg in
-      --lt-*) ;;
-      *) set x "$@" "$lt_wr_arg"; shift;;
-      esac
-      shift
-    done ;;
-  esac
-  func_exec_program_core ${1+"$@"}
-}
-
-  # Parse options
-  func_parse_lt_options "$0" ${1+"$@"}
-
-  # Find the directory that this script lives in.
-  thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'`
-  test "x$thisdir" = "x$file" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'`
-  while test -n "$file"; do
-    destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'`
-
-    # If there was a directory component, then change thisdir.
-    if test "x$destdir" != "x$file"; then
-      case "$destdir" in
-      [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
-      *) thisdir="$thisdir/$destdir" ;;
-      esac
-    fi
-
-    file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'`
-    file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'`
-  done
-
-  # Usually 'no', except on cygwin/mingw when embedded into
-  # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
-  if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
-    # special case for '.'
-    if test "$thisdir" = "."; then
-      thisdir=`pwd`
-    fi
-    # remove .libs from thisdir
-    case "$thisdir" in
-    *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;;
-    .libs )   thisdir=. ;;
-    esac
-  fi
-
-  # Try to get the absolute directory name.
-  absdir=`cd "$thisdir" && pwd`
-  test -n "$absdir" && thisdir="$absdir"
-
-  program='c3_window_cairo_quartz_demo_debug'
-  progdir="$thisdir/.libs"
-
-
-  if test -f "$progdir/$program"; then
-    # Add our own library path to DYLD_LIBRARY_PATH
-    DYLD_LIBRARY_PATH="/Users/thodg/c/thodg/c3-lang/c3/libc3/window/cairo/quartz/.libs:/Users/thodg/c/thodg/c3-lang/c3/libc3/window/cairo/.libs:/Users/thodg/c/thodg/c3-lang/c3/libc3/window/.libs:/Users/thodg/c/thodg/c3-lang/c3/libc3/.libs:/Users/thodg/c/thodg/c3-lang/c3/libffi/.libs:$DYLD_LIBRARY_PATH"
-
-    # Some systems cannot cope with colon-terminated DYLD_LIBRARY_PATH
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    DYLD_LIBRARY_PATH=`$ECHO "$DYLD_LIBRARY_PATH" | /usr/bin/sed 's/::*$//'`
-
-    export DYLD_LIBRARY_PATH
-
-    if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
-      # Run the actual program with our arguments.
-      func_exec_program ${1+"$@"}
-    fi
-  else
-    # The program doesn't exist.
-    $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2
-    $ECHO "This script is just a wrapper for $program." 1>&2
-    $ECHO "See the libtool documentation for more information." 1>&2
-    exit 1
-  fi
-fi
diff --git a/libc3/window/cairo/quartz/quartz_to_xkbcommon.c b/libc3/window/cairo/quartz/quartz_to_xkbcommon.c
new file mode 100644
index 0000000..29b8d4c
--- /dev/null
+++ b/libc3/window/cairo/quartz/quartz_to_xkbcommon.c
@@ -0,0 +1,89 @@
+/* c3
+ * Copyright 2022,2023 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#include <libc3/types.h>
+#include <xkbcommon/xkbcommon.h>
+
+u32 quartz_to_xkbcommon (u16 quartz_key)
+{
+  switch (quartz_key) {
+  case    27: return XKB_KEY_Escape;
+  case 63236: return XKB_KEY_F1;
+  case 63237: return XKB_KEY_F2;
+  case 63238: return XKB_KEY_F3;
+  case 63239: return XKB_KEY_F4;
+  case 63240: return XKB_KEY_F5;
+  case 63241: return XKB_KEY_F6;
+  case 63242: return XKB_KEY_F7;
+  case 63243: return XKB_KEY_F8;
+  case 63244: return XKB_KEY_F9;
+  case 63245: return XKB_KEY_F10;
+  case 63246: return XKB_KEY_F11;
+  case 63247: return XKB_KEY_F12;
+  case    96: return XKB_KEY_grave;
+  case    49: return XKB_KEY_1;
+  case    50: return XKB_KEY_2;
+  case    51: return XKB_KEY_3;
+  case    52: return XKB_KEY_4;
+  case    53: return XKB_KEY_5;
+  case    54: return XKB_KEY_6;
+  case    55: return XKB_KEY_7;
+  case    56: return XKB_KEY_8;
+  case    57: return XKB_KEY_9;
+  case    48: return XKB_KEY_0;
+  case    45: return XKB_KEY_minus;
+  case    61: return XKB_KEY_equal;
+  case   127: return XKB_KEY_BackSpace;
+  case     9: return XKB_KEY_Tab;
+  case    97: return XKB_KEY_a;
+  case    98: return XKB_KEY_b;
+  case    99: return XKB_KEY_c;
+  case   100: return XKB_KEY_d;
+  case   101: return XKB_KEY_e;
+  case   102: return XKB_KEY_f;
+  case   103: return XKB_KEY_g;
+  case   104: return XKB_KEY_h;
+  case   105: return XKB_KEY_i;
+  case   106: return XKB_KEY_j;
+  case   107: return XKB_KEY_k;
+  case   108: return XKB_KEY_l;
+  case   109: return XKB_KEY_m;
+  case   110: return XKB_KEY_n;
+  case   111: return XKB_KEY_o;
+  case   112: return XKB_KEY_p;
+  case   113: return XKB_KEY_q;
+  case   114: return XKB_KEY_r;
+  case   115: return XKB_KEY_s;
+  case   116: return XKB_KEY_t;
+  case   117: return XKB_KEY_u;
+  case   118: return XKB_KEY_v;
+  case   119: return XKB_KEY_w;
+  case   120: return XKB_KEY_x;
+  case   121: return XKB_KEY_y;
+  case   122: return XKB_KEY_z;
+  case    91: return XKB_KEY_bracketleft;
+  case    93: return XKB_KEY_bracketright;
+  case    92: return XKB_KEY_backslash;
+  case    59: return XKB_KEY_semicolon;
+  case    39: return XKB_KEY_apostrophe;
+  case    13: return XKB_KEY_Return;
+  case    44: return XKB_KEY_comma;
+  case    46: return XKB_KEY_period;
+  case    47: return XKB_KEY_slash;
+  case 63232: return XKB_KEY_Up;
+  case 63233: return XKB_KEY_Down;
+  case 63234: return XKB_KEY_Left;
+  case 63235: return XKB_KEY_Right;
+  default: break;
+  }
+  return XKB_KEY_NoSymbol;
+}
diff --git a/libc3/window/cairo/quartz/quartz_to_xkbcommon.h b/libc3/window/cairo/quartz/quartz_to_xkbcommon.h
new file mode 100644
index 0000000..9924b8e
--- /dev/null
+++ b/libc3/window/cairo/quartz/quartz_to_xkbcommon.h
@@ -0,0 +1,20 @@
+/* c3
+ * Copyright 2022,2023 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#ifndef LIBC3_WINDOW_CAIRO_QUARTZ_QUARTZ_TO_XKBCOMMON_H
+#define LIBC3_WINDOW_CAIRO_QUARTZ_QUARTZ_TO_XKBCOMMON_H
+
+#include <libc3/types.h>
+
+u32 quartz_to_xkbcommon (u16 quartz_key);
+
+#endif /* LIBC3_WINDOW_CAIRO_QUARTZ_QUARTZ_TO_XKBCOMMON_H */
diff --git a/libc3/window/cairo/quartz/sources.mk b/libc3/window/cairo/quartz/sources.mk
index d1718a4..8ae455f 100644
--- a/libc3/window/cairo/quartz/sources.mk
+++ b/libc3/window/cairo/quartz/sources.mk
@@ -1,12 +1,14 @@
 # sources.mk generated by update_sources
 HEADERS = \
+	quartz_to_xkbcommon.h \
 	window_cairo_quartz.h \
 	window_cairo_quartz_app_delegate.h \
 	window_cairo_quartz_view.h \
 	window_cairo_quartz_view_controller.h \
+	xkbquartz.h \
 
 SOURCES = \
-	 \
+	quartz_to_xkbcommon.c \
 
 OBJC_SOURCES = \
 	window_cairo_quartz.m \
diff --git a/libc3/window/cairo/quartz/sources.sh b/libc3/window/cairo/quartz/sources.sh
index bba16fc..03cc583 100644
--- a/libc3/window/cairo/quartz/sources.sh
+++ b/libc3/window/cairo/quartz/sources.sh
@@ -1,4 +1,4 @@
 # sources.sh generated by update_sources
-HEADERS='window_cairo_quartz.h window_cairo_quartz_app_delegate.h window_cairo_quartz_view.h window_cairo_quartz_view_controller.h '
-SOURCES=' '
+HEADERS='quartz_to_xkbcommon.h window_cairo_quartz.h window_cairo_quartz_app_delegate.h window_cairo_quartz_view.h window_cairo_quartz_view_controller.h xkbquartz.h '
+SOURCES='quartz_to_xkbcommon.c '
 OBJC_SOURCES='window_cairo_quartz.m window_cairo_quartz_app_delegate.m window_cairo_quartz_view.m window_cairo_quartz_view_controller.m '
diff --git a/libc3/window/cairo/quartz/update_sources b/libc3/window/cairo/quartz/update_sources
index e451e01..1c33156 100755
--- a/libc3/window/cairo/quartz/update_sources
+++ b/libc3/window/cairo/quartz/update_sources
@@ -19,8 +19,7 @@ echo "# sources.sh generated by update_sources" > ${SOURCES_SH}
 HEADERS="$(ls *.h | sort)"
 sources HEADERS "$HEADERS"
 
-#SOURCES="$(ls *.c | sort)"
-SOURCES=
+SOURCES="$(ls *.c | sort)"
 sources SOURCES "$SOURCES"
 
 OBJC_SOURCES="$(ls *.m | sort)"
diff --git a/libc3/window/cairo/quartz/window_cairo_quartz_view.m b/libc3/window/cairo/quartz/window_cairo_quartz_view.m
index 99567fd..ef9ebdd 100644
--- a/libc3/window/cairo/quartz/window_cairo_quartz_view.m
+++ b/libc3/window/cairo/quartz/window_cairo_quartz_view.m
@@ -12,6 +12,8 @@
  */
 #import <Foundation/Foundation.h>
 #import <cairo/cairo-quartz.h>
+#import <xkbcommon/xkbcommon.h>
+#import "quartz_to_xkbcommon.h"
 #import "window_cairo_quartz_view.h"
 
 @implementation WindowCairoQuartzView
@@ -32,7 +34,12 @@
 - (void)keyDown:(NSEvent *)event {
   NSString *characters = [event characters];
   unichar character = [characters characterAtIndex:0];
-  NSLog(@"Key pressed: %d", character);
+  u32 keysym = quartz_to_xkbcommon(character);
+  if (! self.window_cairo->key(self.window_cairo, keysym)) {
+    [self.window close];
+    [self.window release];
+    [[NSApplication sharedApplication] stop:nil];
+  }
 }
 
 - (void) drawRect:(NSRect)dirtyRect {
@@ -41,8 +48,9 @@
     cairo_quartz_surface_create_for_cg_context([[NSGraphicsContext currentContext] CGContext], self.bounds.size.width, self.bounds.size.height);
     cairo_t *cr = cairo_create(surface);
     if (! self.window_cairo->render(self.window_cairo, cr)) {
-      /* close window */
-      (void) 0;
+      [self.window close];
+      [self.window release];
+      [[NSApplication sharedApplication] stop:nil];
     }
     cairo_surface_flush(surface);
     cairo_destroy(cr);
diff --git a/libc3/window/cairo/quartz/xkbquartz.h b/libc3/window/cairo/quartz/xkbquartz.h
new file mode 100644
index 0000000..62ff40c
--- /dev/null
+++ b/libc3/window/cairo/quartz/xkbquartz.h
@@ -0,0 +1,18 @@
+/* c3
+ * Copyright 2022,2023 kmx.io <contact@kmx.io>
+ *
+ * Permission is hereby granted to use this software granted the above
+ * copyright notice and this permission paragraph are included in all
+ * copies and substantial portions of this software.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+ * PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+ * AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+#ifndef LIBC3_WINDOW_CAIRO_QUARTZ_H
+#define LIBC3_WINDOW_CAIRO_QUARTZ_H
+
+
+
+#endif /* LIBC3_WINDOW_CAIRO_XCB_H */
diff --git a/libc3/window/cairo/types.h b/libc3/window/cairo/types.h
index 2818b97..d85f85f 100644
--- a/libc3/window/cairo/types.h
+++ b/libc3/window/cairo/types.h
@@ -29,7 +29,7 @@ typedef bool (*f_window_cairo_button) (s_window_cairo *window,
                                        u8 button, sw x, sw y);
 
 /* return false to break event loop */
-typedef bool (*f_window_cairo_key) (s_window_cairo *window, uw key);
+typedef bool (*f_window_cairo_key) (s_window_cairo *window, uw keysym);
 
 /* return false to break event loop */
 typedef bool (*f_window_cairo_load) (s_window_cairo *window);
diff --git a/libc3/window/cairo/window_cairo.c b/libc3/window/cairo/window_cairo.c
index d5668d8..fa64378 100644
--- a/libc3/window/cairo/window_cairo.c
+++ b/libc3/window/cairo/window_cairo.c
@@ -12,6 +12,7 @@
  */
 #include <assert.h>
 #include <stdlib.h>
+#include <xkbcommon/xkbcommon.h>
 #include "window_cairo.h"
 
 s_window_cairo * window_cairo_init (s_window_cairo *window,
@@ -46,16 +47,18 @@ bool window_cairo_button_default (s_window_cairo *window, u8 button,
   (void) button;
   (void) x;
   (void) y;
-  printf("window_cairo_button_default: %lu (%ld, %ld)\n", (uw) button, x, y);
+  printf("window_cairo_button_default: %d (%ld, %ld)\n",
+         (int) button, x, y);
   return true;
 }
 
-bool window_cairo_key_default (s_window_cairo *window, uw key)
+bool window_cairo_key_default (s_window_cairo *window, uw keysym)
 {
+  char keysym_name[64];
   assert(window);
   (void) window;
-  (void) key;
-  printf("window_cairo_key_default: %lu\n", key);
+  xkb_keysym_get_name(keysym, keysym_name, sizeof(keysym_name));
+  printf("window_cairo_key_default: %lu %s\n", keysym, keysym_name);
   return true;
 }
 
diff --git a/libc3/window/cairo/window_cairo.h b/libc3/window/cairo/window_cairo.h
index 8d43853..d64ccca 100644
--- a/libc3/window/cairo/window_cairo.h
+++ b/libc3/window/cairo/window_cairo.h
@@ -26,7 +26,7 @@ bool             window_cairo_run (s_window_cairo *window);
 /* callbacks */
 bool window_cairo_button_default (s_window_cairo *window, u8 button,
                                   sw x, sw y);
-bool window_cairo_key_default (s_window_cairo *window, uw key);
+bool window_cairo_key_default (s_window_cairo *window, uw keysym);
 bool window_cairo_load_default (s_window_cairo *window);
 bool window_cairo_motion_default (s_window_cairo *window, sw x, sw y);
 bool window_cairo_render_default (s_window_cairo *window, cairo_t *cr);
diff --git a/libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c b/libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c
index b2f4738..74bf506 100644
--- a/libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c
+++ b/libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c
@@ -18,18 +18,14 @@
 #include "../../c3_window_cairo_demo.h"
 #include "../window_cairo_xcb.h"
 
-static bool on_button (s_window_cairo *window, u8 button,
-                       sw x, sw y);
-static bool on_key (s_window_cairo *window, uw key);
-
 int main (void)
 {
   s_window_cairo window;
   window_cairo_init(&window, 0, 0, 800, 600,
                     "C3.Window.Cairo.XCB demo",
                     LIBC3_WINDOW_CAIRO_DEMO_SEQUENCE_COUNT);
-  window.button = on_button;
-  window.key    = on_key;
+  window.button = c3_window_cairo_demo_button;
+  window.key    = c3_window_cairo_demo_key;
   window.load   = c3_window_cairo_demo_load;
   window.render = c3_window_cairo_demo_render;
   window.resize = c3_window_cairo_demo_resize;
@@ -37,42 +33,3 @@ int main (void)
     return g_c3_exit_code;
   return 0;
 }
-
-static bool on_button (s_window_cairo *window, u8 button, sw x, sw y)
-{
-  assert(window);
-  (void) window;
-  (void) button;
-  (void) x;
-  (void) y;
-  printf("on_button: %lu (%ld, %ld)\n", (uw) button, x, y);
-  return true;
-}
-
-static bool on_key (s_window_cairo *window, uw key)
-{
-  assert(window);
-  (void) window;
-  switch (key) {
-  case 9:
-  case 38:
-    g_c3_exit_code = 0;
-    return false;
-  case 100:
-    if (! window_set_sequence_pos((s_window *) window,
-                                  (window->sequence_pos +
-                                   window->sequence_count - 1) %
-                                  window->sequence_count))
-      return false;
-    break;
-  case 102:
-    if (! window_set_sequence_pos((s_window *) window,
-                                  (window->sequence_pos + 1) %
-                                  window->sequence_count))
-      return false;
-    break;
-  default:
-    printf("on_key: %lu\n", key);
-  }
-  return true;
-}
diff --git a/libc3/window/cairo/xcb/window_cairo_xcb.c b/libc3/window/cairo/xcb/window_cairo_xcb.c
index 6dd92b4..461d011 100644
--- a/libc3/window/cairo/xcb/window_cairo_xcb.c
+++ b/libc3/window/cairo/xcb/window_cairo_xcb.c
@@ -63,7 +63,7 @@ bool window_cairo_xcb_event (s_window_cairo *window,
     event_key = (xcb_key_press_event_t *) event;
     xkb_keysym_t sym = xkb_state_key_get_one_sym(xkb_state, event_key->detail);
     printf("KEY PRESS %d\n", sym);
-    if (! window->key(window, event_key->detail))
+    if (! window->key(window, sym))
       goto ko;
     break;
   case XCB_MOTION_NOTIFY:
diff --git a/libc3/window/types.h b/libc3/window/types.h
index c75be2f..cbf599b 100644
--- a/libc3/window/types.h
+++ b/libc3/window/types.h
@@ -27,7 +27,7 @@ typedef bool (*f_window_button) (s_window *window, u8 button,
                                  uw x, uw y);
 
 /* return false to break event loop */
-typedef bool (*f_window_key) (s_window *window, uw key);
+typedef bool (*f_window_key) (s_window *window, uw sym);
 
 /* return false to break event loop */
 typedef bool (*f_window_load) (s_window *window);
diff --git a/sources.mk b/sources.mk
index e5130de..df2c3ab 100644
--- a/sources.mk
+++ b/sources.mk
@@ -257,8 +257,14 @@ C3_C_SOURCES = \
 	libc3/window/cairo/window_cairo.c \
 	libc3/window/cairo/c3_window_cairo_demo.h \
 	libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h \
-	libc3/window/cairo/quartz/demo/main.c \
-	libc3/window/cairo/quartz/custom_cairo_view.h \
+	libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.c \
+	libc3/window/cairo/quartz/window_cairo_quartz_view_controller.h \
+	libc3/window/cairo/quartz/quartz_to_xkbcommon.c \
+	libc3/window/cairo/quartz/window_cairo_quartz.h \
+	libc3/window/cairo/quartz/window_cairo_quartz_app_delegate.h \
+	libc3/window/cairo/quartz/quartz_to_xkbcommon.h \
+	libc3/window/cairo/quartz/xkbquartz.h \
+	libc3/window/cairo/quartz/window_cairo_quartz_view.h \
 	libc3/window/cairo/window_cairo.h \
 	libc3/window/cairo/c3_window_cairo_demo.c \
 	libc3/window/window.c \
diff --git a/sources.sh b/sources.sh
index 7a3c133..a40af98 100644
--- a/sources.sh
+++ b/sources.sh
@@ -1,4 +1,4 @@
 # sources.sh generated by update_sources
 C3_CONFIGURES='c3c/configure c3s/configure c3s/update_sources ic3/configure ic3/update_sources libc3/configure libc3/update_sources libc3/window/configure libc3/window/update_sources libc3/window/cairo/xcb/demo/configure libc3/window/cairo/xcb/demo/update_sources libc3/window/cairo/xcb/configure libc3/window/cairo/xcb/update_sources libc3/window/cairo/configure libc3/window/cairo/update_sources libc3/window/cairo/quartz/demo/configure libc3/window/cairo/quartz/demo/update_sources libc3/window/cairo/quartz/configure libc3/window/cairo/quartz/update_sources libtommath/configure libtommath/update_sources test/configure test/update_sources ucd2c/configure '
 C3_MAKEFILES='c3c/Makefile c3s/Makefile ic3/Makefile libc3/Makefile libc3/gen.mk libc3/window/Makefile libc3/window/cairo/xcb/demo/Makefile libc3/window/cairo/xcb/Makefile libc3/window/cairo/Makefile libc3/window/cairo/quartz/demo/Makefile libc3/window/cairo/quartz/Makefile libtommath/Makefile test/Makefile ucd2c/Makefile '
-C3_C_SOURCES='c3c/c3c.c c3s/buf_readline.c c3s/c3s.c c3s/buf_readline.h ic3/buf_linenoise.h ic3/ic3.c ic3/linenoise.c ic3/buf_linenoise.c libc3/buf_inspect_s_base.c.in libc3/type.h libc3/fact.c libc3/time.h libc3/fn.h libc3/s16.h libc3/buf_inspect_s8_octal.h libc3/log.c libc3/error.h libc3/buf_inspect_u64_octal.h libc3/set_item.h.in libc3/compare.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_uw_hexadecimal.h libc3/uw.c libc3/eval.c libc3/set__fact.c libc3/sym.h libc3/env.h libc3/cfn.c libc3/buf_inspect_u16_octal.h libc3/u.h.in libc3/buf_parse_s16.c libc3/s8.h libc3/quote.h libc3/buf_inspect_s32.h libc3/buf_inspect.c libc3/buf_parse_u.h.in libc3/skiplist_node__fact.h libc3/skiplist__fact.c libc3/buf_inspect_s32_hexadecimal.h libc3/ceiling.h libc3/list.c libc3/buf_inspect_u64.c libc3/facts.h libc3/buf_inspect_u16_decimal.c libc3/facts_with_cursor.c libc3/buf_inspect_sw_decimal.c libc3/facts_cursor.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_s32_decimal.h libc3/u16.h libc3/buf_inspect_s64_octal.h libc3/buf_inspect_u8_binary.h libc3/buf_inspect_s8.h libc3/buf_inspect_s16_octal.h libc3/ucd.c libc3/buf_inspect_s16_binary.h libc3/tuple.c libc3/buf_inspect_uw_octal.h libc3/buf_parse_u8.c libc3/tag.h libc3/float.h libc3/buf_inspect_u_base.c.in libc3/buf_parse_u16.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_s8_decimal.c libc3/buf_inspect_u32.h libc3/array.c libc3/buf_parse_sw.h libc3/set.h.in libc3/s.c.in libc3/buf_parse_s.c.in libc3/map.h libc3/skiplist.h.in libc3/set__tag.h libc3/buf_inspect_s64.c libc3/io.c libc3/set_item__tag.c libc3/sequence.c libc3/types.h libc3/buf_inspect_uw.c libc3/buf_inspect_u32_binary.c libc3/buf_inspect_s64_decimal.h libc3/set_cursor.c.in libc3/ident.c libc3/buf_inspect_s64_hexadecimal.c libc3/bool.h libc3/s.h.in libc3/set.c.in libc3/skiplist.c.in libc3/operator.h libc3/fn_clause.h libc3/buf_parse_s.h.in libc3/buf_inspect_s16.c libc3/binding.c libc3/ptag.h libc3/buf_parse_s32.h libc3/var.h libc3/set_item__fact.h libc3/u8.c libc3/set_cursor.h.in libc3/f32.c libc3/buf_inspect_sw_octal.h libc3/c3.h libc3/arg.h libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u32_hexadecimal.h libc3/buf_parse_u64.c libc3/module.c libc3/frame.h libc3/buf_inspect_s16_decimal.c libc3/file.h libc3/sw.h libc3/s32.c libc3/error_handler.c libc3/str.c libc3/buf_parse.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_uw_decimal.h libc3/facts_spec_cursor.c libc3/u64.h libc3/buf_inspect_u_base.h.in libc3/buf_inspect_s32_octal.h libc3/f64.h libc3/buf_inspect_u8_octal.h libc3/buf_inspect_s64_binary.c libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u16_binary.c libc3/buf_save.h libc3/buf_inspect_u16.c libc3/buf_inspect_s8_hexadecimal.c libc3/u.c.in libc3/buf_inspect_sw.h libc3/facts_with.c libc3/buf_parse_u.c.in libc3/buf_parse_u32.h libc3/set_cursor__fact.c libc3/buf.h libc3/set_cursor__tag.h libc3/buf_inspect_s16_hexadecimal.h libc3/buf_inspect_u32_decimal.h libc3/buf_parse_uw.c libc3/buf_parse_s64.c libc3/abs.h libc3/buf_inspect_sw_binary.c libc3/buf_parse_s8.h libc3/call.h libc3/sign.c libc3/buf_inspect_u8_decimal.h libc3/character.h libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_s_base.h.in libc3/buf_inspect_u32_octal.h libc3/u32.c libc3/hash.c libc3/buf_file.h libc3/integer.c libc3/buf_inspect_u8.c libc3/facts_spec.c libc3/buf_inspect_s32_binary.h libc3/set_item.c.in libc3/s64.h libc3/buf_inspect_u16_decimal.h libc3/facts.c libc3/buf_inspect_u64.h libc3/buf_inspect_sw_decimal.h libc3/facts_with_cursor.h libc3/skiplist_node__fact.c libc3/buf_inspect.h libc3/quote.c libc3/buf_inspect_s32.c libc3/skiplist_node.h.in libc3/s8.c libc3/buf_parse_s16.h libc3/list.h libc3/ceiling.c libc3/buf_inspect_s.h.in libc3/buf_inspect_s32_hexadecimal.c libc3/skiplist__fact.h libc3/uw.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_s8_binary.c libc3/compare.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u16_octal.c libc3/cfn.h libc3/env.c libc3/set__fact.h libc3/sym.c libc3/eval.h libc3/c3_main.h libc3/buf_inspect_s8_octal.c libc3/s16.c libc3/fn.c libc3/time.c libc3/fact.h libc3/type.c libc3/error.c libc3/log.h libc3/sequence.h libc3/set_item__tag.h libc3/io.h libc3/buf_inspect_s64.h libc3/buf_inspect_s64_hexadecimal.h libc3/window/types.h libc3/window/window.h libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c libc3/window/cairo/xcb/demo/window.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/types.h libc3/window/cairo/window_cairo.c libc3/window/cairo/c3_window_cairo_demo.h libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h libc3/window/cairo/quartz/demo/main.c libc3/window/cairo/quartz/custom_cairo_view.h libc3/window/cairo/window_cairo.h libc3/window/cairo/c3_window_cairo_demo.c libc3/window/window.c libc3/ident.h libc3/buf_inspect_s64_decimal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_uw.h libc3/buf_inspect_u.c.in libc3/buf_parse_sw.c libc3/array.h libc3/buf_inspect_u32.c libc3/buf_inspect_s8_decimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_parse_u16.h libc3/set__tag.c libc3/map.c libc3/tag.c libc3/buf_parse_u8.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_u8_binary.c libc3/buf_inspect_s64_octal.c libc3/u16.c libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_u64_binary.c libc3/facts_cursor.h libc3/tuple.h libc3/buf_inspect_s16_binary.c libc3/ucd.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s8.c libc3/sha1.h libc3/buf_inspect_uw_binary.h libc3/buf_parse.c libc3/str.h libc3/error_handler.h libc3/u64.c libc3/buf_inspect_s32_octal.c libc3/facts_spec_cursor.h libc3/buf_inspect_uw_decimal.c libc3/sw.c libc3/file.c libc3/buf_inspect_s16_decimal.h libc3/frame.c libc3/s32.h libc3/c3.c libc3/f32.h libc3/buf_inspect_sw_octal.c libc3/u8.h libc3/set_item__fact.c libc3/var.c libc3/module.h libc3/license.c libc3/buf_inspect_u32_hexadecimal.c libc3/buf_parse_u64.h libc3/buf_inspect_u8_hexadecimal.h libc3/arg.c libc3/fn_clause.c libc3/operator.c libc3/bool.c libc3/buf_parse_s32.c libc3/ptag.c libc3/binding.h libc3/buf_inspect_u.h.in libc3/buf_inspect_s16.h libc3/integer.h libc3/buf_file.c libc3/s64.c libc3/buf_inspect_s32_binary.c libc3/buf_inspect_u8.h libc3/facts_spec.h libc3/buf_inspect_u8_decimal.c libc3/sign.h libc3/call.c libc3/buf_parse_s8.c libc3/buf_inspect_sw_binary.h libc3/hash.h libc3/u32.h libc3/buf_inspect_u32_octal.c libc3/character.c libc3/buf_inspect_u64_decimal.c libc3/buf_parse_uw.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_s16_hexadecimal.c libc3/set_cursor__tag.c libc3/set_cursor__fact.h libc3/buf.c libc3/abs.c libc3/buf_parse_s64.h libc3/buf_inspect_s.c.in libc3/buf_inspect_s64_binary.h libc3/buf_inspect_u8_octal.c libc3/f64.c libc3/skiplist_node.c.in libc3/buf_parse_u32.c libc3/facts_with.h libc3/buf_inspect_sw.c libc3/buf_inspect_u16.h libc3/buf_inspect_s8_hexadecimal.h libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u64_hexadecimal.h libc3/buf_save.c test/ident_test.c test/buf_parse_test_s16.c test/buf_inspect_test.c test/libc3_test.c test/fn_test.c test/buf_parse_test_u16.c test/str_test.c test/cfn_test.c test/character_test.c test/buf_parse_test_s8.c test/skiplist__fact_test.c test/sym_test.c test/tag_test.h test/buf_file_test.c test/bool_test.c test/fact_test.h test/buf_parse_test_u64.c test/compare_test.c test/facts_with_test.c test/array_test.c test/buf_parse_test.h test/test.h test/buf_parse_test_su.h test/env_test.c test/buf_parse_test_s64.c test/types_test.c test/hash_test.c test/call_test.c test/set__tag_test.c test/facts_test.c test/facts_cursor_test.c test/compare_test.h test/buf_parse_test_s32.c test/test.c test/buf_parse_test.c test/fact_test.c test/tag_test.c test/set__fact_test.c test/buf_parse_test_u32.c test/buf_test.c test/list_test.c test/buf_parse_test_u8.c test/tuple_test.c ucd2c/ucd.h ucd2c/ucd2c.c '
+C3_C_SOURCES='c3c/c3c.c c3s/buf_readline.c c3s/c3s.c c3s/buf_readline.h ic3/buf_linenoise.h ic3/ic3.c ic3/linenoise.c ic3/buf_linenoise.c libc3/buf_inspect_s_base.c.in libc3/type.h libc3/fact.c libc3/time.h libc3/fn.h libc3/s16.h libc3/buf_inspect_s8_octal.h libc3/log.c libc3/error.h libc3/buf_inspect_u64_octal.h libc3/set_item.h.in libc3/compare.c libc3/buf_inspect_s8_binary.h libc3/buf_inspect_uw_hexadecimal.h libc3/uw.c libc3/eval.c libc3/set__fact.c libc3/sym.h libc3/env.h libc3/cfn.c libc3/buf_inspect_u16_octal.h libc3/u.h.in libc3/buf_parse_s16.c libc3/s8.h libc3/quote.h libc3/buf_inspect_s32.h libc3/buf_inspect.c libc3/buf_parse_u.h.in libc3/skiplist_node__fact.h libc3/skiplist__fact.c libc3/buf_inspect_s32_hexadecimal.h libc3/ceiling.h libc3/list.c libc3/buf_inspect_u64.c libc3/facts.h libc3/buf_inspect_u16_decimal.c libc3/facts_with_cursor.c libc3/buf_inspect_sw_decimal.c libc3/facts_cursor.c libc3/buf_inspect_u64_binary.h libc3/buf_inspect_sw_hexadecimal.h libc3/buf_inspect_s32_decimal.h libc3/u16.h libc3/buf_inspect_s64_octal.h libc3/buf_inspect_u8_binary.h libc3/buf_inspect_s8.h libc3/buf_inspect_s16_octal.h libc3/ucd.c libc3/buf_inspect_s16_binary.h libc3/tuple.c libc3/buf_inspect_uw_octal.h libc3/buf_parse_u8.c libc3/tag.h libc3/float.h libc3/buf_inspect_u_base.c.in libc3/buf_parse_u16.c libc3/buf_inspect_u16_hexadecimal.h libc3/buf_inspect_s8_decimal.c libc3/buf_inspect_u32.h libc3/array.c libc3/buf_parse_sw.h libc3/set.h.in libc3/s.c.in libc3/buf_parse_s.c.in libc3/map.h libc3/skiplist.h.in libc3/set__tag.h libc3/buf_inspect_s64.c libc3/io.c libc3/set_item__tag.c libc3/sequence.c libc3/types.h libc3/buf_inspect_uw.c libc3/buf_inspect_u32_binary.c libc3/buf_inspect_s64_decimal.h libc3/set_cursor.c.in libc3/ident.c libc3/buf_inspect_s64_hexadecimal.c libc3/bool.h libc3/s.h.in libc3/set.c.in libc3/skiplist.c.in libc3/operator.h libc3/fn_clause.h libc3/buf_parse_s.h.in libc3/buf_inspect_s16.c libc3/binding.c libc3/ptag.h libc3/buf_parse_s32.h libc3/var.h libc3/set_item__fact.h libc3/u8.c libc3/set_cursor.h.in libc3/f32.c libc3/buf_inspect_sw_octal.h libc3/c3.h libc3/arg.h libc3/buf_inspect_u8_hexadecimal.c libc3/buf_inspect_u32_hexadecimal.h libc3/buf_parse_u64.c libc3/module.c libc3/frame.h libc3/buf_inspect_s16_decimal.c libc3/file.h libc3/sw.h libc3/s32.c libc3/error_handler.c libc3/str.c libc3/buf_parse.h libc3/buf_inspect_uw_binary.c libc3/buf_inspect_uw_decimal.h libc3/facts_spec_cursor.c libc3/u64.h libc3/buf_inspect_u_base.h.in libc3/buf_inspect_s32_octal.h libc3/f64.h libc3/buf_inspect_u8_octal.h libc3/buf_inspect_s64_binary.c libc3/buf_inspect_u64_hexadecimal.c libc3/buf_inspect_u16_binary.c libc3/buf_save.h libc3/buf_inspect_u16.c libc3/buf_inspect_s8_hexadecimal.c libc3/u.c.in libc3/buf_inspect_sw.h libc3/facts_with.c libc3/buf_parse_u.c.in libc3/buf_parse_u32.h libc3/set_cursor__fact.c libc3/buf.h libc3/set_cursor__tag.h libc3/buf_inspect_s16_hexadecimal.h libc3/buf_inspect_u32_decimal.h libc3/buf_parse_uw.c libc3/buf_parse_s64.c libc3/abs.h libc3/buf_inspect_sw_binary.c libc3/buf_parse_s8.h libc3/call.h libc3/sign.c libc3/buf_inspect_u8_decimal.h libc3/character.h libc3/buf_inspect_u64_decimal.h libc3/buf_inspect_s_base.h.in libc3/buf_inspect_u32_octal.h libc3/u32.c libc3/hash.c libc3/buf_file.h libc3/integer.c libc3/buf_inspect_u8.c libc3/facts_spec.c libc3/buf_inspect_s32_binary.h libc3/set_item.c.in libc3/s64.h libc3/buf_inspect_u16_decimal.h libc3/facts.c libc3/buf_inspect_u64.h libc3/buf_inspect_sw_decimal.h libc3/facts_with_cursor.h libc3/skiplist_node__fact.c libc3/buf_inspect.h libc3/quote.c libc3/buf_inspect_s32.c libc3/skiplist_node.h.in libc3/s8.c libc3/buf_parse_s16.h libc3/list.h libc3/ceiling.c libc3/buf_inspect_s.h.in libc3/buf_inspect_s32_hexadecimal.c libc3/skiplist__fact.h libc3/uw.h libc3/buf_inspect_uw_hexadecimal.c libc3/buf_inspect_s8_binary.c libc3/compare.h libc3/buf_inspect_u64_octal.c libc3/buf_inspect_u16_octal.c libc3/cfn.h libc3/env.c libc3/set__fact.h libc3/sym.c libc3/eval.h libc3/c3_main.h libc3/buf_inspect_s8_octal.c libc3/s16.c libc3/fn.c libc3/time.c libc3/fact.h libc3/type.c libc3/error.c libc3/log.h libc3/sequence.h libc3/set_item__tag.h libc3/io.h libc3/buf_inspect_s64.h libc3/buf_inspect_s64_hexadecimal.h libc3/window/types.h libc3/window/window.h libc3/window/cairo/xcb/demo/c3_window_cairo_xcb_demo.c libc3/window/cairo/xcb/demo/window.c libc3/window/cairo/xcb/window_cairo_xcb.h libc3/window/cairo/xcb/config.h libc3/window/cairo/xcb/window_cairo_xcb.c libc3/window/cairo/types.h libc3/window/cairo/window_cairo.c libc3/window/cairo/c3_window_cairo_demo.h libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo_bridging_header.h libc3/window/cairo/quartz/demo/c3_window_cairo_quartz_demo.c libc3/window/cairo/quartz/window_cairo_quartz_view_controller.h libc3/window/cairo/quartz/quartz_to_xkbcommon.c libc3/window/cairo/quartz/window_cairo_quartz.h libc3/window/cairo/quartz/window_cairo_quartz_app_delegate.h libc3/window/cairo/quartz/quartz_to_xkbcommon.h libc3/window/cairo/quartz/xkbquartz.h libc3/window/cairo/quartz/window_cairo_quartz_view.h libc3/window/cairo/window_cairo.h libc3/window/cairo/c3_window_cairo_demo.c libc3/window/window.c libc3/ident.h libc3/buf_inspect_s64_decimal.c libc3/buf_inspect_u32_binary.h libc3/buf_inspect_uw.h libc3/buf_inspect_u.c.in libc3/buf_parse_sw.c libc3/array.h libc3/buf_inspect_u32.c libc3/buf_inspect_s8_decimal.h libc3/buf_inspect_u16_hexadecimal.c libc3/buf_parse_u16.h libc3/set__tag.c libc3/map.c libc3/tag.c libc3/buf_parse_u8.h libc3/buf_inspect_uw_octal.c libc3/buf_inspect_u8_binary.c libc3/buf_inspect_s64_octal.c libc3/u16.c libc3/buf_inspect_sw_hexadecimal.c libc3/buf_inspect_s32_decimal.c libc3/buf_inspect_u64_binary.c libc3/facts_cursor.h libc3/tuple.h libc3/buf_inspect_s16_binary.c libc3/ucd.h libc3/buf_inspect_s16_octal.c libc3/buf_inspect_s8.c libc3/sha1.h libc3/buf_inspect_uw_binary.h libc3/buf_parse.c libc3/str.h libc3/error_handler.h libc3/u64.c libc3/buf_inspect_s32_octal.c libc3/facts_spec_cursor.h libc3/buf_inspect_uw_decimal.c libc3/sw.c libc3/file.c libc3/buf_inspect_s16_decimal.h libc3/frame.c libc3/s32.h libc3/c3.c libc3/f32.h libc3/buf_inspect_sw_octal.c libc3/u8.h libc3/set_item__fact.c libc3/var.c libc3/module.h libc3/license.c libc3/buf_inspect_u32_hexadecimal.c libc3/buf_parse_u64.h libc3/buf_inspect_u8_hexadecimal.h libc3/arg.c libc3/fn_clause.c libc3/operator.c libc3/bool.c libc3/buf_parse_s32.c libc3/ptag.c libc3/binding.h libc3/buf_inspect_u.h.in libc3/buf_inspect_s16.h libc3/integer.h libc3/buf_file.c libc3/s64.c libc3/buf_inspect_s32_binary.c libc3/buf_inspect_u8.h libc3/facts_spec.h libc3/buf_inspect_u8_decimal.c libc3/sign.h libc3/call.c libc3/buf_parse_s8.c libc3/buf_inspect_sw_binary.h libc3/hash.h libc3/u32.h libc3/buf_inspect_u32_octal.c libc3/character.c libc3/buf_inspect_u64_decimal.c libc3/buf_parse_uw.h libc3/buf_inspect_u32_decimal.c libc3/buf_inspect_s16_hexadecimal.c libc3/set_cursor__tag.c libc3/set_cursor__fact.h libc3/buf.c libc3/abs.c libc3/buf_parse_s64.h libc3/buf_inspect_s.c.in libc3/buf_inspect_s64_binary.h libc3/buf_inspect_u8_octal.c libc3/f64.c libc3/skiplist_node.c.in libc3/buf_parse_u32.c libc3/facts_with.h libc3/buf_inspect_sw.c libc3/buf_inspect_u16.h libc3/buf_inspect_s8_hexadecimal.h libc3/buf_inspect_u16_binary.h libc3/buf_inspect_u64_hexadecimal.h libc3/buf_save.c test/ident_test.c test/buf_parse_test_s16.c test/buf_inspect_test.c test/libc3_test.c test/fn_test.c test/buf_parse_test_u16.c test/str_test.c test/cfn_test.c test/character_test.c test/buf_parse_test_s8.c test/skiplist__fact_test.c test/sym_test.c test/tag_test.h test/buf_file_test.c test/bool_test.c test/fact_test.h test/buf_parse_test_u64.c test/compare_test.c test/facts_with_test.c test/array_test.c test/buf_parse_test.h test/test.h test/buf_parse_test_su.h test/env_test.c test/buf_parse_test_s64.c test/types_test.c test/hash_test.c test/call_test.c test/set__tag_test.c test/facts_test.c test/facts_cursor_test.c test/compare_test.h test/buf_parse_test_s32.c test/test.c test/buf_parse_test.c test/fact_test.c test/tag_test.c test/set__fact_test.c test/buf_parse_test_u32.c test/buf_test.c test/list_test.c test/buf_parse_test_u8.c test/tuple_test.c ucd2c/ucd.h ucd2c/ucd2c.c '