I lost my Donkey Kong bongos so it's back to programming on a keyboard for me it's not too
big of a deal but I'm having some trouble setting it up that being said let's talk about keyboards
if you're watching this video right now chances are you're at least familiar
with the QWERTY layout of keyboard it's the standard English QWERTYUIOPASDFGHJKLZXCVBNM
and it's most recognised as the international layout its efficiency and ergometry are of course
heavily debated but it's not like you're actually going to use Dvorak but even within English QWERTY
there are still variations the most widespread one being the English US it's everything you
need to type in English your standard Latin alphabet, numbers, symbols and shift key for
additional characters even so I do occasionally opt for the English Canadian keyboard which
is in every way identical to the English US except for the feature in which it is better the keyboard
that actually differs from the English US is the English UK which is used in the UK and Ireland
notable changes include the inclusion of the pound and euro symbols as well as some placement
changes because the British would prefer the at sign to be off to the side here rather than off
to the side over there however the QWERTY keyboard is based on the English language
its keys and positions engineered in accordance to the frequencies of English characters once
you introduce other languages it becomes a matter of design some languages take your Latin alphabet
and add fun DLCs like tonal markings and extra characters the English UK keyboard also acts
as the Irish keyboard allowing us to input all the accented vowels needed in the Irish language
use a key called the Alt Graph the Alt Graph key serves as a less impressive sequel to Shift
allowing us to input foreign characters or characters that are less commonly used
having a separate key from the Shift key to input the accented versions of characters is useful
because that way you can hold both the Shift and Alt Graph keys to get the uppercase version of the
accented characters but this method of adding these accents or diacritics can be exhausting
especially if a language has many of them or uses them very frequently I don't want to have to use
combo attacks to write a Google Document in some languages like Polish the solution is
to just set the character with the diacritic as its own separate key since in these languages
the character with the diacritic is used fairly frequently and there aren't too many diacritics
that it'll make the keyboard cluttered however this doesn't apply to languages like French or
Vietnamese which have several diacritics some characters having over a dozen diacritics or
combinations of diacritics this issue is solved by introducing dead keys which are basically
keys that don't do anything on their own but modify another character so that they have
diacritics in the French AZERTY you input the diacritic keys before the character whereas in
the Vietnamese Telex you input the diacritic keys after note that while Alt Graph, additional keys,
and dead keys are all viable options for adding special characters to your keyboard
most languages actually use a combination of the three localisation of a keyboard is more than
just taking the keys of one language and slapping them onto the board of another language you also
have to take into account the writing patterns of the language and change the positions of the
keys to optimise for this the French language in different regions uses different variations of
the AZERTY layout except for Canadian French which uses QWERTY Russian uses JCUKEN German uses QWERTZ
and the Swiss keyboard uses the German QWERTZ but with French and Italian accents and English
labels as a way to remain neutral one thing to point out is that regardless of what the writing
system of a language is such as Russian or Arabic most keyboards will still include the English
Latin alphabet somewhere in the keyboard this is because the Latin alphabet is essential for using
a computer writing URLs, working with programming languages, playing Mario's Fun With Letters it
ensures that not even the Inuktitut typists are safe from JavaScript in fact many languages go
as far as having a de facto version of the keyboard that is based off of the English US
this could either be for programmers or for users who are more familiar with the English US format
such as non-native speakers but every layout I've covered thus far only addresses languages
that are linear and have some sort of alphabet or alphabet equivalent good thing all languages use
simple phonetic alphabets though could you imagine one that didn't that would be so hard to learn
Chinese characters are purely logographic writing system meaning that you can't determine the
pronunciation by just looking at each character and every single word has its own unique character
meaning that there are thousands of characters to memorise at around the time the QWERTY keyboard
was being invented for typewriter there were three major languages that still employed the Chinese
character writing system and that was Chinese obviously, Japanese with Kanji, and Korean with
Hanja typewriters are a different ordeal from modern computer keyboards however they operated
using a cylinder called a platen that was situated on the carriage and could move horizontally and
every time you pressed a key it strike a character into the paper and then move to the next position
until it got to the very end of the line where it would ring a bell and you push it back so it can
get to the new line as for special characters it works mostly the same there's no Alt Graph key on
a typewriter so it either occupies its own key or if it's just a regular key with a diacritic
you could use a dead key the implementation of dead keys in typewriters is pretty intuitive
just when you press a dead key instead of moving the platen horizontally it just stays in place
until you press the key that the diacritic belongs to however returning to the point no reasonable
amount of keys or dead keys was going to fit the thousands of Chinese characters required on a
typewriter in fact engineers at the time would even joke about Chinese typewriters because it
was just so ridiculous nonetheless people still persisted and engineers of all three languages
tried different approaches to create a practical Chinese character typewriter the approach taken
by the Korean language was to immediately give up historically Korean may have used
Chinese characters or Hanja but Koreans still had a phonetic writing system called Hangul that was
invented in the 1400s and so it was much easier to implement that into the typewriter than the
logographic Chinese characters thus Korean just didn't bother with Chinese characters and today
Hangul is the main writing system of the language anyway this isn't to say that there weren't any
difficulties however Korean Hangul was still very different from most Western scripts in that each
character actually represented a syllable comprised of two, three, or possibly even
more letters for example to write a three letter syllable you have to first input one consonant and
then a vowel and then a second consonant perhaps the simplest implementation which was also the
most well-known one was called the 3 set keyboard in which the keyboard was partitioned into three
sets one for the initial consonant one for the middle vowel and one for the final consonant
in this way when you pressed the initial consonant it advances once you press the vowel it advances
once and the final consonant acts as a dead key that is displaced on the previous character so
that you can type the characters in the order of the letters this would also mean that the
consonants were shown twice on the keyboard once for the initial and once for the final this
implementation definitely had its flaws however because not every Korean characters followed the
layout of top-left top-right bottom and even for the ones that did the font looked very clunky and
was dubbed as the clothesline font this is because the characters kind of look like a cloth on a
clothesline if cloths looked like Korean letters and clotheslines also looked like Korean letters
two letter characters could be implemented by just not using the dead key but I can't imagine
what one would have to do to implement characters with more than three letters further improvements
to the three set typewriter as well as the invention of the four set and five set typewriter
allowed for more stylistic accuracy to Hangul went fully into all the nuances of the writing system
although they did take longer to write with what were we talking about again oh right Chinese
characters Chinese and Japanese didn't have the same option that Korean did Japanese does have two
phonetic writing systems Hiragana and Katakana and there did exist purely Katakana typewriters for
telegrams however because of all the homonyms in Japanese just knowing the phonetics of sentence is
often not enough to comprehend it as for Chinese well Chinese without Chinese characters is just
between Chinese and Japanese there were many variations of the Chinese character although
what was most characteristic of all of them was the very odd methods of selecting a character
one method of selection was a large matrix holding every single character along with a handle that
can point to each character and a key that is pressed that prints the character being pointed to
a similar version that looked less like a typewriter used a very large cylinder to hold
all the characters instead but ultimately it was the same idea optimisation was attempted in the
order of the characters in the matrix or cylinder traditionally when ordering Chinese characters
such as in a Chinese dictionary the characters are grouped in terms of their radicals which are
parts of the character that are similar between many different characters these radicals are then
ordered in the number strokes needed to draw the radical and then within each radical group
the characters are also ordered in the number of strokes to draw the rest of the character however
this method proved itself to be not very practical it takes a long time to roll that absolute barrel
of a typewriter and it's not like the most common words are the ones that come first in the
dictionary some rather clever folks figured out that they could drastically improve typing speeds
by ordering the characters in terms of how common they are some even more cleverer folks figured out
if they grouped characters that were often used together they could increase typing speeds even
more leading to the first instance of a rather janky version of word prediction for keyboards an
honourable mention would be IBM's Electric Chinese typewriter which attempted to speed things up by
instead of having to move a handle or a cylinder around it allowed you to input a 4 digit number up
to 5400 in which every single number corresponded to a Chinese character now instead of having to
take all that time looking for your character you just have to memorise 5400 combinations it was
admittedly faster though and you could now type at a whopping speed of 45 words per minute because
of all these complexities Chinese and Japanese typewriters remained mostly for the professionals
for most of their history luckily this was all the past and everyone was too busy being miserable to
care and besides something was about the happen that was going to make typewriter obsolete anyway
when I press on a key on a physical keyboard it closes a switch that allows current to flow
to a chip that is inside of the keyboard if the keyboard is a USB keyboard or a Bluetooth keyboard
the operating system of your computer will continuously ask the keyboard
if any of the keys are being pressed the method is called polling if a key is pressed the keyboard
in return transmits a number as binary data to the operating system in software a character is
often represented by its ASCII or Unicode value which is a system that is a system that maps a
number to every possible character that you might want to use however this is not the number being
transmitted by the keyboard instead the keyboard transmits a number that is seemingly irrelevant to
the character on the key called a scancode which instead corresponds to the position of the key on
the keyboard since the operating system knows the layout of your keyboard since you would've
had to tell it that when you were setting it up it can then use the scancode to map to a Unicode or
ASCII value from there it can create a keyboard event which it can send to whatever application
is active the application can then decide what to do with the ASCII or Unicode value in that event
such as render the corresponding image from a font and there you go without even thinking the key
that you pressed on your keyboard is now displayed on your screen so many layers to implement this
simple mechanic good thing people only use this triumph of technology for insightful decorum
I must admit that my explanation of the hardware bit of a keyboard is a bit simplified and as a
software developer this is what we call something that we're not going to go into however the main
takeaway here should be that since the keyboard is only communicating the position of the keys
and the operating system is what is handling the layout the issue of keyboard localisation
has become a software issue rather than a hardware issue with hardware only designed in accordance to
how the software is implemented this allows for much more flexibility in implementing different
features in different languages for languages that just use different characters or symbols or have
various dead keys the implementation is pretty straightforward just when the scancode for that
key is given map to the different key rather than the the one you would see on an English keyboard
and as for dead keys instead of adding a character it would be modifying an existing
or upcoming character the software can also easily handle other features of Latin languages such as
is the language written left to right or maybe right to left like Arabic and Hebrew
for the CJK languages or Chinese Japanese Korean there are a few more steps to take before we can
start typing the Korean keyboard gets a bit of an upgrades from the 3 set to the 2 set keyboard
in which half of the keyboard is reserved for consonants and half of the keyboard is
reserved for vowels we know longer need a set for every single position in the
character because now the software can be used to determine the position of the next letter
based off of the previous letters in what you're typing how does a typewriter type
a 5 letter character? who cares! BA BA BA BA BA 3 set keyboards still exist though as some people
find them to be more efficient and you also don't have to type the letters in order when
you're making a character as the positions are defined by the sets on the keyboard
just like the old typewriter days the secret to Chinese and Japanese input is
word prediction Romaji is the romanisation of Japanese meaning that it uses Latin characters
to represent Japanese phonetics when inputting Japanese from a QWERTY keyboard the romaji
is converted into kana which is hiragana or katakana the two phonetic writing systems that
Japanese uses and from there a word prediction is used to determine the kanji that the
hiragana or katakana is expressing often giving you several options to choose from
since there are so many homonyms you can also use the Japanese International Standard if
you want to type with kana directly though typing in kana directly even on a Japanese
International Standard is less common since it's not as convenient to type Latin characters and
Latin characters have become commonplace in Japanese typing in the mainland China and
Singapore the method to input Chinese characters is remarkably similar to that of Japanese romaji
in which a romanisation of the language Pinyin is used to type in characters phonetically
there's no kana in Chinese so it skips directly from Latin alphabet to Chinese characters giving
you once again a selection of options to choose out of all of the homonyms while Chinese does not
have a phonetic writing system like Japanese does there are other ways to phoneticise the language
without using romanisation such as in Taiwan which uses Zhuyin or Bopomofo which is always fun to say
the system uses different symbols to represent all the possible sounds in Mandarin Chinese and
like a direct kana input you input the sounds and they get converted into Chinese characters based
off of a list of options for Traditional Chinese typists in Hong Kong there's a bit of an issue
because there's no official phonetic system for Cantonese instead the most common keyboard layout
is the Cangjie (Chongkit) keyboard layout which rather than inputting characters phonetically,
inputs the radicals of the radicals to build them note that these radicals are similar to
the ones used to order characters in a dictionary but it's a different system entirely in Cangjie
the radicals are all characters themselves so you get fun keys like sun and moon and corpse you may
notice that all of the CJK input methods follow a similar framework comprised of two modules
the composer which lets you write in phonetics and radicals and the converter which predicts
characters from these phonetics and radicals Korean doesn't have a converter stage but you
can use one anyway to convert Hangul into Hanja if you so desired this framework is called an IME
or Input Method Editor and its aim is to create a simple system for implementing any of these
complex input methods and that's kind of the whole idea of the localisation of keyboards it's not so
much localisation as it is internationalisation or allowing one product to be easily adapted into
any language sure the English US is not optimal in typing every language but
with some keyboard stickers and a language pack you could type any language you wanted with it the
keyboard had been internationalised by software and so the keyboard the keyboard that types in
every language is no more than the keyboard we started with your standard QWERTY English US
keyboard now while the English US can type in any language including the CJK languages there
are still specific layouts that it cannot copy 1 for 1 due to hardware once example of such is the
Japanese International Standard which has an extra column however as someone of the internet I am
obligated to make poor financial decisions and so here we have the Japanese International Standard
now it took me a while but I think I installed the IME correctly so let's see how this goes
[Existential Dread]