Commit 7c864d8
committed
MGTK: Don't invoke first menu item without shortcuts on ^@
Control+Shift+2 a.k.a. ^@ yields the ASCII NUL value. This was used in
the menu definitions to signal "no shortcut". MGTK didn't special-case
this, so the first menu item without a shortcut would be invoked when
this key combination was pressed.
In DeskTop this was "About Apple II DeskTop" so the dialog would show!
Address this by having the menu defining macros put a value with the
high bit set; MGTK strips the high bit from the keyboard input so it
can never match. This allows MGTK apps to actually define a shortcut
with ^@ if they want to.1 parent 8b64809 commit 7c864d8
File tree
5 files changed
+39
-15
lines changed- src
- desktop
- mgtk
- tests
5 files changed
+39
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
522 | 527 | | |
523 | 528 | | |
524 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
327 | 332 | | |
328 | 333 | | |
329 | 334 | | |
| |||
347 | 352 | | |
348 | 353 | | |
349 | 354 | | |
350 | | - | |
351 | | - | |
| 355 | + | |
| 356 | + | |
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
| |||
883 | 888 | | |
884 | 889 | | |
885 | 890 | | |
886 | | - | |
| 891 | + | |
887 | 892 | | |
888 | | - | |
| 893 | + | |
889 | 894 | | |
890 | 895 | | |
891 | 896 | | |
892 | 897 | | |
893 | 898 | | |
894 | | - | |
| 899 | + | |
895 | 900 | | |
896 | | - | |
897 | | - | |
898 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
899 | 904 | | |
900 | 905 | | |
901 | | - | |
| 906 | + | |
902 | 907 | | |
903 | 908 | | |
904 | 909 | | |
905 | | - | |
906 | | - | |
| 910 | + | |
| 911 | + | |
907 | 912 | | |
908 | 913 | | |
909 | | - | |
| 914 | + | |
910 | 915 | | |
911 | 916 | | |
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
915 | 920 | | |
916 | 921 | | |
| 922 | + | |
917 | 923 | | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
918 | 927 | | |
919 | 928 | | |
920 | 929 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
289 | 290 | | |
290 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
0 commit comments