index   prev   next RISC OS Notes

Characters, glyphs, accents
codepages and keyboards

!needs work!

# a character is an abstraction. a Platonic ideal

a glyph is a representation of a character a font is a numbered set of glyphs The numbers correspond to code positions of the characters (presented by the glyphs)

# Rules for drawing glyphs

1 clockwise 2 left to right 3 top to bottom

# Accents and special characters RISC OS

Link to RISC OS Wiki Link to Alt-Codes - use !chars - or key directly:- Alt + ; for umlauts a, e, i, o, u Alt + [ for acute accents Alt + ] for grave accents Alt + / for cedillas Alt + ' for circumflex accents examples: Alt + [ then e é acute Alt + ] then e è grave Alt + ? then c ç cedilla Alt + @ then e ê circonflex Alt + , then n ñ enya Alt + ; then u ö umlaut Alt-S : … ellipsis repeats other accented chars are available - see User manual Alt Gr + Shift + ? ¿ spanish question mark Alt Gr + Shift + ! ¡ spanish exclamation mark Alt Gr + Shift + r ® Registered trade mark Alt Gr + Shift + c © Copyright symbol or use alt + character position on the numeric keys (see http://www.tony-franks.co.uk/UTF-8.htm for glyphs)

# Accents and special characters in email encoded in UTF-8

the following were trawled from "Spanish word of the day" Messenger and Perdóname by Pablo Almodar Firefox Linux á &C3 A1 E1 á é &C3 A9 E9 é ý &C3 AD ED í ó &C3 B3 F3 ó ú &C3 BA FA ú ñ &C3 B1 F1 ñ à $C3 93 D3 Ó Â¿ &C2 BF BF ¿ ⦠&E2 80 A6 8C …

# Character Entity References in HTML 4 and XHTML 1.0

http://www.elizabethcastro.com/html/extras/entities.html   &160 no-break space = non-breaking space

# chars what is that character 1?

start a taskwindow *basic >P.CHR$(34) # >P.&3D 61 >P.~480 1E0

# chars - what is that character 2?

StrongED information bar extreme left has a toggle field that can display hex and decimal values of the character at the cursor. Also StrongED - adjust click on Info button - open window for data on character under cursor

# ASCII codes

American Standard Code for Information Interchange Strictly, ASCII (ISO 646) only defines 7 bit codes ISO-8859-1(Latin1) is an 8-bit ASCII extension and is shown below + 0 2 4 6 8 10 12 14 + 1 3 5 7 9 11 13 15 0 0 16 1 32 ! " # $ % & ' ( ) * + , - . / 2 48 0 1 2 3 4 5 6 7 8 9 : ; < = > ? 3 64 @ A B C D E F G H I J K L M N O 4 80 P Q R S T U V W X Y Z [ \ ] ^ _ 5 96 ` a b c d e f g h i j k l m n o 6 112 p q r s t u v w x y z { | } ~ 7 128 8 144 9 160   ¡ § £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ 10 176 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ 11 192 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï 12 208 Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß 13 224 à á â ã ä å æ ç è é ê ë ì í î ï 14 240 ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ 15 add the down index to the across index for character code number

# documentation sources for chars keycodes wimpkey

for values and uses of ascii control codes see:- http://en.wikipedia.org/wiki/Device_Control_1 ADFS::HardDisc5.$.DOCZ.IYOhardware.keysmouse.scancodes2 ADFS::HardDisc5.$.APPZ.R1.!Routines.Routines.swis wimp_key keyboard status byte viz shows what keys are pressed or held down see risc os manual for Latin2 alphabet table etc there is a table of ASCII codes in the ConvText manual (Strong Help) there is a table of ASCII codes in the BASIC manual (Strong Help) to use it - find char, add the down index to the across index eg1. for SPC = 0+32 eg2. for "z" = 10+112 reverse eg1. for &3D -> 13+ 48 = "=" reverse eg2. for &7E -> 14+112 = "~"

# Clipboard

# Clipboard - IcnClipBrd To use IcnClipBrd to access the contents of writable icons, the caret must be in such an icon. The following keys will now work: * Ctrl-V pastes the global clipboard into the icon. * Ctrl-Z clears the icon, then pastes the clipboard in. * Ctrl-C copies the contents of the icon to the clipboard. * Ctrl-X cuts the contents to the clipboard (copy then clear). * Ctrl-D de-DOSifies the filename in the icon (eg. "NOTES/TXT" would become "Notes"). * Ctrl-E extracts the extension only (eg. "NOTES/TXT" would become "TXT"). * Ctrl-K deletes everything left of the cursor (not saved to the clipboard). * Ctrl-Q passes the next keypress on to the task as though IcnClipBrd wasn't loaded. * Ctrl-U, clears the icon as usual. # Clipboard support in DTP apps (Artworks using text area) from to paste SaveAs SAs+style DnD AW * AW / / x * see note EW AW x / x / OP AW x / x / P+ AW x / x . SE AW x / . / AW EW . / . . OP EW / / x (DDL) / P+ EW / / / no styles . SE EW / / . / AW OP . / . . EW OP / / x error msg / P+ OP / / x . SE OP / / . / AW P+ . / . . EW P+ / / / (via RTF) / OP P+ / / x (DDL) / SE P+ / / . / AW SE . / x . EW SE / / x / OP SE / / x / P+ SE / / x . Xara SE / SE Xara / * note to copy text from ArtWorks text line to AW text area: select the text line export as text with selection ticked drop onto AW window choose clipboard select AW text area ctrl-v to paste text from the clipboard

# Key Combination Shortcuts

# Cursor copying this works in StrongEd windows including Task windows Press shift-End - a red box appears (A9 beeps but no box but ok) arrow key up the line to be copied press End to copy one character at a time # Close all windows Ctrl-Alt-Select click on a window's close icon closes all windows at the same nesting level. This is intended for nested-wimp apps but the effect on a "normal" window is to close ALL windows on the desktop. And on the iconise icon it iconises all windows. # CSD set current directory - set the CSD with *Dir Path$ where Path$ is a full directory path. - ctrl shift tab and mouse pointer (StrongEd) - not A9Home - use Filer>>Set Directory - $/DOCS/ARCHIVE/HTML/ARCHIVE/VOLUME15/15_07/15_07_/PT17.HTM has documentation of CSD URD and CSL # Hide all StrongEd windows - ctrl shift H # Bring Icon bar iconbar to the front - shift-f12 # Lose focus in a window - ctrl-F7 (stronged) # Tabs StrongEd - mark block then >>block >process >tab to spaces StrongEd - sF4... !x Advanced search, \t,"....." (tab to dots)

realvnc client on mac with hp keyboard to risc os

Cmd key operates as Alt for renaming files eg - as in Alt+Select on filename in filer Alt key does not operate as Alt + nnn for characters eg Alt 123 -> 123 but Alt+n followed by n gives an enya - (on risc os use Alt+, n for enya) use alt+l | use key marked ~# # use- alt+3 the key next to Return legend (#~) outputs (\|) the key next to left-shft legend (\|) outputs (`~)

# Linux accented characters

with compose key (alt gr): ¿ ?? ¡ !! ñ ~ + n with dead keys (quote and tilde) é ' + e E ' + E ñ ~ + n how to enable accented chars in linux change linux do it - http://stefaanlippens.net/accented-characters-on-qwerty-keyboard http://wiki.linuxquestions.org/wiki/Accented_Characters http://spanish.about.com/od/writtenspanish/a/dia_ubuntu.htm

# UTF-8 Unicode

https://en.wikipedia.org/wiki/UTF-8 In August 1992, this proposal was circulated by an IBM X/Open representative to interested parties. Ken Thompson of the Plan 9 operating system group at Bell Labs then made a small but crucial modification to the encoding, making it very slightly less bit- efficient than the previous proposal but allowing it to be self- synchronizing, meaning that it was no longer necessary to read from the beginning of the string to find code point boundaries. Thompson's design was outlined on September 2, 1992, on a placemat in a New Jersey diner with Rob Pike. The following days, Pike and Thompson implemented it and updated Plan 9 to use it throughout, and then communicated their success back to X/Open.[10] Last Bits code point Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6  7 U+007F 0xxxxxxx 11 U+07FF 110xxxxx 10xxxxxx 16 U+FFFF 1110xxxx 10xxxxxx 10xxxxxx 21 U+1FFFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 26 U+3FFFFFF 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 31 U+7FFFFFFF 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx (the x's are replaced by the bits of the code point): example how to encode é in UTF-8 é is 0xE9 is 1110 1001 therefore needs two bytes to encode 110..... 10...... inserting into encoding pattern: """"""11 ""101001 expanding 11000011 10101001 which is C3 A9 >>> UTF-8 example how to decode ñ in UTF-8 ñ is C3 B1 ... 110-. ..11 10-11 0001 ... 1111 0001 ... F1 - 241 - ñ more worked examples 00E0;agrave;LATIN SMALL LETTER A WITH GRAVE 00000000 11100000 : ......11 ..100000 : 11000011 10100000 : C3A0 00E7;ccedilla;LATIN SMALL LETTER C WITH CEDILLA 00000000 11100111 : .....111 ..000111 : 11000011 10100111 : C3A7 00E9;eacute;LATIN SMALL LETTER E WITH ACUTE 00000000 11101001 : ......11 ..101001 : 11000011 10101001 : C3A9 00E8;egrave;LATIN SMALL LETTER E WITH GRAVE 00000000 11101000 : ......11 ..101000 : 11000011 10101000 : C3A8 00F1;ntilde;LATIN SMALL LETTER N WITH TILDE 00000000 11110001 : ......11 ..110001 : 11000011 10110001 : C3B1 How these characters are displayed depends on the encoding used. In a Unicode enabled application they will show as: | à | ç | é | è | ñ | (using html entities) the next line is hard coded and should be the same as above: | à | ç | é | è | ñ | (using inserted characters) If the wrong encoding support is used some codes may be interpreted as control characters and odd things may occur. With ISO-8859-1 (Latin1) the above codes may appear like this: | à | ç | é | è | ñ | (using html entities)

# Setting Num Lock

> You could try a BASIC program :- > > SYS "OS_Byte",202,4,251 > SYS "OS_Byte",118

# Setting Caps Lock (*FX 202)

The command to turn Caps Lock on, leaving other settings unchanged, is *FX 202,0,239. The shortened form *FX 202,32 should turn Caps Lock on, but may have side effects. Note also that, to make sure that the LED indicators are correctly updated after a *FX 202 command, it is a good idea to follow it with the simple command *FX 118. The bits of the keyboard status byte have the following meanings: bit value meaning 0 (1) 0 Alt off 1 Alt on 1 (2) 0 Scroll Lock off 1 Scroll Lock on 2 (4) 0 Num Lock on 1 Num Lock off 3 (8) 0 Shift off 1 Shift on 4 ( 16) 0 Caps Lock on 1 Caps Lock off 5 (32) ("Normally set") 6 (64) 0 Ctrl off 1 Ctrl on 7 (128) 0 Shift enable off 1 Shift enable on

# Assigning keycodes

I want to remap 3 unused keys on my USB keyboard and have found the following promising-looking modules: James Peacock's 'KeyMapper' (from the ROOL website) Richard Spencer's 'DesktopKeyMap' (from inside !HID) IfThere .KeyMapper Then Rmensure KeyMapper 0.01 RmLoad .KeyMapper *KeyMap 96 113 *KeyMap 16 112

© JR 2013