apl: unified/dyalog key combinations
[sheet.git] / apl.plp
diff --git a/apl.plp b/apl.plp
index 0e4ddcf47f4cc616b0aa695811f382de43abd66d..44adb74c0e0c722731583bab66422f5c65902df0 100644 (file)
--- a/apl.plp
+++ b/apl.plp
@@ -24,9 +24,10 @@ my @ops = do 'apl.inc.pl';
 <table class="mapped">
 <thead><tr>
        <td rowspan=2>op
 <table class="mapped">
 <thead><tr>
        <td rowspan=2>op
-       <td colspan=2>input
+       <td colspan=3>input
        <td colspan=2>meaning
 <tr>
        <td colspan=2>meaning
 <tr>
+       <td title="unified/Dyalog key combination">⎈
        <td><a href="/digraphs" title="digraph">di</a><td>html
        <td>monadic
        <td>dyadic
        <td><a href="/digraphs" title="digraph">di</a><td>html
        <td>monadic
        <td>dyadic
@@ -36,12 +37,15 @@ my @ops = do 'apl.inc.pl';
 <:
 for my $op (@ops) {
        my ($chr, $monad, $dyad) = @{$op};
 <:
 for my $op (@ops) {
        my ($chr, $monad, $dyad) = @{$op};
+       ($chr, my $altkey) = split /\n/, $chr;
        my $codepoint = ord $chr;
        my $ascii = $codepoint <= 127;
        my $info = $glyphs->glyph_info($codepoint);
        my ($class, $name, $mnem, $html, $string) = @{$info};
        my $codepoint = ord $chr;
        my $ascii = $codepoint <= 127;
        my $info = $glyphs->glyph_info($codepoint);
        my ($class, $name, $mnem, $html, $string) = @{$info};
+
        printf '<tr><th title="%2$s">%s'."\n", $chr, EscapeHTML($name || '?'), $class;
        printf '<td class="%s">%s', @{$_} for (
        printf '<tr><th title="%2$s">%s'."\n", $chr, EscapeHTML($name || '?'), $class;
        printf '<td class="%s">%s', @{$_} for (
+               [$ascii ? 'l5' : defined $altkey ? 'l4' : 'l3', $altkey],
                [defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : $ascii ? 'l5' : 'l1',
                        EscapeHTML($mnem) // sprintf('%s%0*X', $codepoint < 256 ? (x => 2) : (u => 4), $codepoint)],
                [defined $html ? 'l4' : $ascii ? 'l5' : 'l1', $html // "#$codepoint"],
                [defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : $ascii ? 'l5' : 'l1',
                        EscapeHTML($mnem) // sprintf('%s%0*X', $codepoint < 256 ? (x => 2) : (u => 4), $codepoint)],
                [defined $html ? 'l4' : $ascii ? 'l5' : 'l1', $html // "#$codepoint"],