From: Mischa POSLAWSKY Date: Sat, 27 Apr 2024 15:50:08 +0000 (+0200) Subject: keyboard/altgr: c64 layout of petscii graphics X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/7c3505283729953254055925ce997eda7789570b keyboard/altgr: c64 layout of petscii graphics Based on tables and c64 (ish) positions for modern keyboard compatibility. --- diff --git a/keyboard/altgr/c64.eng.inc.pl b/keyboard/altgr/c64.eng.inc.pl new file mode 100644 index 0000000..47112e1 --- /dev/null +++ b/keyboard/altgr/c64.eng.inc.pl @@ -0,0 +1,133 @@ +use utf8; +use strict; +use warnings; +use Shiar_Sheet::KeyboardChars 'kbchars'; + +my %c64 = ( + # control keys not on pet2001 + '1' => "🖤\nBLacK", + '2' => "🤍\nWHiTe", + '3' => "❤️\nRED", + '4' => "🩵\nCYaN", + '5' => "💜\nPURple", + '6' => "💚\nGReeN", + '7' => "💙\nBLUe", + '8' => "💛\nYELlow", + '9' => "💟\nREverSe video ON", + '0' => "💔\nREverSe video OFF", +); + +my %rows = (%c64, + # literal petscii control characters, unaltered from pet2001 + 'a' => '♠', + 'b' => '🭲', + 'c' => '🭸', + 'd' => '🭷', + 'e' => '🭶', + 'f' => '🭺', + 'g' => '🭱', + 'h' => '🭴', + 'i' => '╮', + 'j' => '╰', + 'k' => '╯', + 'l' => '🭼', + 'm' => '╲', + 'n' => '╱', + 'o' => '🭽', + 'p' => '🭾', + 'q' => '●', + 'r' => '🭻', + 's' => '♥', + 't' => '🭰', + 'u' => '╭', + 'v' => '╳', + 'w' => '○', + 'x' => '♣', + 'y' => '🭵', + 'z' => '♦', + ']' => '─', # @ + + # literal pet2001 keys reassigned on c64 + ',' => '┼', # [ c64 + + '.' => '│', # ] c64 - + '\\'=> 'π', # ↑ c64 \ + '}' => '◥', # ← c64 * + '>' => '🮌', # \ c64 ^- + 'B' => '▚', # ? + + # ! " # $ % ' & \ ( ) ← » 1 2 3 4 5 6 7 8 9 0 + - £ + # Q W E R T Y U I O P ↑ 7 8 9 / » Q W E R T Y U I O P @ * ↑ + # A S D F G H J K L : 4 5 6 * » A S D F G H J K L : ; = + # Z X C V B N M , ; ? 1 2 3 + » Z X C V B N M , . / + # @ [ ] < > 0 . - = + + # pet2001 top row + 'K' => '▌', # A pet ! + 'I' => '▄', # B pet " + 'T' => '▔', # C pet # + '{' => '▁', # D pet $ + 'G' => '▏', # E pet % + 'M' => '▕', # G pet ' + '<' => '▒', # F pet & c64 ^+ + '/' => '🮏', # H pet ( c64 ^£ + '?' => '◤', # I pet ) c64 £ + + # pet2001 bottom rows + '[' => '🭿', # Z pet : + 'D' => '▗', # L pet , + 'F' => '▖', # { pet ; + 'C' => '▝', # | pet < + 'V' => '▘', # ~ pet > + + # pet2001 numpad + 'Y' => '🮂', # W pet 7 + 'U' => '🮃', # X pet 8 + 'O' => '▃', # Y pet 9 + 'P' => '▂', # O pet / + 'H' => '▎', # T pet 4 + 'J' => '▍', # U pet 5 + 'L' => '🮈', # V pet 6 + 'N' => '🮇', # J pet * + 'E' => '┴', # Q pet 1 + 'R' => '┬', # R pet 2 + 'W' => '┤', # S pet 3 + 'Q' => '├', # K pet + + 'A' => '┌', # P pet 0 + 'S' => '┐', # N pet . + 'Z' => '└', # M pet - + 'X' => '┘', # } pet = +); + +my $groups = kbchars(\%rows); + +while (my ($k, $c) = each %rows) { + $groups->{def}{''}{$k}[0] = ( + $c64{$k} ? 'g9' : + $c =~ /\p{In=1.1}/ ? 'g2' : + $c =~ /\p{In=4.0}/ ? 'g3' : + $c =~ /[\x{1FB00}-\x{1FBFF}]/ ? 'g5' : # Age=V13.0 + 'g0' + ); +} + ++{ + %{ $groups }, + version => '1.0', + title => 'Commodore graphics', + category => 'legacy/graph', + moderows => '21-1', + intro => join("\n", + 'PETSCII', + 'characters designed for the 1977 PET 2001 machine', + 'as found on the VIC-20 and C-64.', + 'See also MSX graph and', + 'modern Unicode.', + ), + image => 'data/keyboard/thumb/c64.jpg', + flag => { + g2 => ['standard' => 'original Unicode 1993'], + g3 => ['extended' => 'Unicode 4.0'], + g5 => ['legacy' => 'exceptional symbols for legacy computing in Unicode since 2020'], + g9 => ['color' => 'presentational controls represented by anachronistic hearts'], + }, +} diff --git a/keyboard/altgr/index.inc.pl b/keyboard/altgr/index.inc.pl index d6ddd1d..30b6381 100644 --- a/keyboard/altgr/index.inc.pl +++ b/keyboard/altgr/index.inc.pl @@ -8,7 +8,7 @@ my %cat = ( latin => [qw( ipa-ucl olpc boyeg drix )], science => [qw( symbolics apl spacecadet )], graph => [qw( unigraph emojiworks )], - extra => [qw( msx-graph p8scii zoo )], + extra => [qw( msx-graph c64 p8scii zoo )], ); for my $name (map {@{$_}} values %cat) { diff --git a/keyboard/altgr/msx-graph.eng.inc.pl b/keyboard/altgr/msx-graph.eng.inc.pl index 1b79678..72a999b 100644 --- a/keyboard/altgr/msx-graph.eng.inc.pl +++ b/keyboard/altgr/msx-graph.eng.inc.pl @@ -140,12 +140,14 @@ $groups->{flag}{g8} = ['legacy', %{ $groups }, version => '1.0', title => 'MSX graph', - category => 'legacy/msx', + category => 'legacy/graph/msx', intro => join("\n", 'Resulting selection', 'of equivalent Unicode characters', "when the graph key is pressed on an MSX home computer", "(International model such as Toshiba HX10 or Phillips NMS 8245).", + 'Similar to PETSCII and', + 'modern Unicode.', 'See also letters and symbols', "from pressing code.", ), diff --git a/keyboard/altgr/unigraph.eng.inc.pl b/keyboard/altgr/unigraph.eng.inc.pl index c1d29cd..7c4d570 100644 --- a/keyboard/altgr/unigraph.eng.inc.pl +++ b/keyboard/altgr/unigraph.eng.inc.pl @@ -72,7 +72,7 @@ $groups->{def}{''}{')'}[0] .= ' linkkeyboard/altgr/zoo'; %{ $groups }, version => '1.2', title => 'Unicode semigraphics', - category => 'specialized', + category => 'specialized/graph', intro => join("\n", sprintf('Keyboard mode to %s draw character graphics.', 'manually', diff --git a/unicode-table.inc.pl b/unicode-table.inc.pl index d1875ef..2342d75 100644 --- a/unicode-table.inc.pl +++ b/unicode-table.inc.pl @@ -130,7 +130,8 @@ block => { shades => [qw{. ░ . ▒ . ▓ }], fill4 => [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }], fill4i => [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }], - fill8 => [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }], + fill8 => [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ }], + fill8r => [qw{. ▔ 🮂 🮃 ▀ 🮄 🮅 🮆 . ▕ 🮇 🮈 ▐ 🮉 🮊 🮋 }], colour => [qw{. 🟫 🟥 🟧 🟨 🟩 🟦 🟪}], },