← 回電腦概論 · All Lessons

How Computers Work · Unit 2 · Lesson 8 · 電腦概論 單元二 第八課

What Happens When You Press a Key?按下一個鍵,發生了什麼?

Follow one key in 3D, from the keyboard, along the cable, through the processor and memory, to the screen. At every stop it is something different: a switch, a key number, a character number, eight bits, and at last a pattern of pixels. Then guess what it is at each stop, sort input from output, and test the keys on your own keyboard.
在 3D 裡跟著一個鍵走一趟:從鍵盤出發,沿著線,經過處理器和記憶體,走到螢幕。每一站它都是不一樣的東西:一個開關、一個鍵的編號、一個字元的編號、八個位元,最後是一片像素。接著猜猜它在每一站是什麼、分辨輸入和輸出,再測測自己鍵盤上的鍵。

Big idea · 一句話看懂

A computer takes something in, works on it, and sends something out: input, processing, output. A keyboard does not send a letter. It sends a number that says which key was pressed. The computer turns that into a character number, keeps it in memory as bits, and lights pixels on the screen. It is 0s and 1s the whole way.
電腦把東西收進來、處理它、再送出去:輸入、處理、輸出。鍵盤送出的不是一個字母,而是一個「哪一個鍵被按了」的編號。電腦把它變成字元的編號,用位元放在記憶體裡,再讓螢幕上的像素亮起來。從頭到尾都是 0 和 1。

3D Model · 3D 模型

One Key, Five Stops 一個鍵,五站

On the left is a keyboard with four keys. In the middle is a circuit board with a processor and eight cells of memory. On the right is a screen with 35 pixels. Choose a key and press it, then follow the glowing dot. The list on the right fills in what the key has become at each stop. Then hold Shift and press the same key again, and see which stops change.
左邊是一個只有四個鍵的鍵盤,中間是一塊電路板,上面有處理器和八格記憶體,右邊是一個 35 個像素的螢幕。選一個鍵按下去,跟著那顆光點走。右邊的清單會一站一站填上:這個鍵在那一站變成了什麼。接著按住 Shift,再按一次同一個鍵,看看哪幾站變了。

Tap a key · 點一個鍵 Drag to turn · 拖曳旋轉

This 3D model needs WebGL, which this browser does not support. The keys and the five stops below still work, and so do the reading and the games.
這個瀏覽器不支援 WebGL,無法顯示 3D 模型;下面的按鍵和五站清單照樣能用,課文和小遊戲也都能用。

  • Keys: each one is a switch
    按鍵:每一個都是開關
  • Glowing dot: where the key press is now
    光點:這一次按鍵現在走到哪裡
  • Processor: glows blue while it looks up the character
    處理器:查字元的時候發藍光
  • Eight memory cells: a lit cell is a 1
    八格記憶體:亮的是 1
  • Screen pixels: 5 across, 7 down
    螢幕的像素:橫 5 格、直 7 格

A teaching model. The key numbers are the real ones from the USB keyboard standard (the A key is 4, the 1 key is 30, the space bar is 44); other kinds of keyboard connection use other numbers. In a real computer the lookup is done by the operating system, a program that the processor runs, and it uses whatever keyboard layout you have chosen. The model always uses the U.S. layout. A real keyboard also reports when the key comes back up. And a real letter is drawn with far more pixels than 35: the tiny letter shapes here are our own, drawn just for this model.
這是教學用的示意模型。鍵的編號是 USB 鍵盤標準裡真正的編號(A 鍵是 4、1 鍵是 30、空白鍵是 44);其他接法的鍵盤用的是別的編號。真的電腦裡,查表這件事是作業系統做的(作業系統也是處理器在執行的程式),而且用的是你選的鍵盤配置;模型固定用美式配置。真的鍵盤在鍵彈回來的時候也會回報。還有,真的字用的像素遠遠多於 35 個:這裡小小的字形是我們為了這個模型自己畫的。

Model and code are drawn and programmed by My Culture Connect. The steps are tested in tools/computers/test/keypath.test.mjs.
模型與程式由人師教育協會自行繪製、撰寫;每一站的規則有自動測試(tools/computers/test/keypath.test.mjs)。

Reading · 英文閱讀

8

Unit 8: What Happens When You Press a Key?

Press the key marked A, and the letter a appears on the screen. It seems to happen at once, and it seems simple. It is not simple. Between your finger and the screen, that key press changes form four times. Let us follow it.

按下標著 A 的那個鍵,螢幕上就出現字母 a。這件事好像是一瞬間發生的,也好像很簡單。其實不簡單。從你的手指到螢幕之間,這一次按鍵換了四次樣子。我們跟著它走一趟。

Under each key there is a switch. When you press the key, the switch closes, and the keyboard sends the computer a number. The number does not mean a letter. It means a key: it says which key was pressed. On a USB keyboard, the A key is key number 4. The keyboard sends the same number whether you are holding Shift or not, and it reports again when you let the key go.

每個鍵的下面都有一個開關。你按下鍵,開關接通,鍵盤就送一個數給電腦。這個數指的不是一個字母,而是一個鍵:它說的是「哪一個鍵被按了」。在 USB 鍵盤上,A 鍵是第 4 號鍵。不管你有沒有按住 Shift,鍵盤送出的都是同一個數;你放開鍵的時候,它還會再回報一次。

Now the computer has to decide what the key means. It looks at three things: the key number, whether Shift is down, and the keyboard layout you have chosen. From these it picks a character. Key 4 with no Shift gives a. Key 4 with Shift gives A. As you saw in Lesson 2, every character has its own number: a is 97, and A is 65.

接下來,電腦要決定這個鍵是什麼意思。它看三樣東西:鍵的編號、Shift 有沒有按著、你選的鍵盤配置。從這三樣,它挑出一個字元。第 4 號鍵、沒按 Shift,是 a;第 4 號鍵、按著 Shift,是 A。第二課說過,每個字元都有自己的編號:a 是 97,A 是 65。

The number 97 is stored in memory as eight bits: 01100001. The program you are typing in now has a new character to work with, and the processor carries out that program’s instructions, one small step at a time, just as in Lesson 6. If you save your work, the bits are copied to storage, as in Lesson 7.

97 這個數,以八個位元放進記憶體:01100001。現在,你正在打字的那個程式多了一個字元可以用;處理器一小步一小步地執行那個程式的指令,就像第六課那樣。如果你存檔,這些位元會被抄到儲存裝置,就像第七課那樣。

You still cannot see anything. To show the character, the computer needs a shape for it, and the shapes come from a font. A font is a collection of shapes for characters. The computer uses the font to decide which pixels on the screen to light, and the letter appears. Choose a different font and other pixels light up, but the character in memory is still 97.

到這裡,你還是什麼都看不到。要把這個字元顯示出來,電腦需要它的形狀,而形狀來自字型。字型就是一整套字元的形狀。電腦用字型決定螢幕上哪些像素要亮,字母就出現了。換一種字型,亮的像素就不一樣,可是記憶體裡的字元還是 97。

This is the pattern of every computer: input, processing, output. An input device, such as a keyboard, a mouse, or a microphone, turns something from the outside world into electrical signals in binary code. The computer works on them. An output device, such as a screen, a printer, or a speaker, turns the signals back into something a person can understand. Switches, bits, codes, a processor, memory: everything in the first eight lessons took part in that one key press.

每一台電腦都照這個模式工作:輸入、處理、輸出。輸入裝置(像鍵盤、滑鼠、麥克風)把外面世界的東西變成二進位的電訊號;電腦處理這些訊號;輸出裝置(像螢幕、印表機、喇叭)再把訊號變回人看得懂、聽得懂的東西。開關、位元、編碼、處理器、記憶體——前八課講過的每一樣東西,都參與了這一次按鍵。
Read aloud · 課文朗讀

Questions · 閱讀理解

What does a keyboard send to the computer when you press a key?

It sends a number that says which key was pressed. It does not send a letter. The computer decides which character the key means.

Why do a and A come from the same key but have different numbers in memory?

The key sends the same key number both times. The computer looks at the key number, the Shift key, and the keyboard layout, and picks a different character: a is 97, and A is 65.

Name one input device and one output device, and say what each one does.

For example, a keyboard is an input device: it turns key presses into signals the computer can use. A screen is an output device: it turns the computer’s signals into pictures a person can see.

Words & Phrases · 生字及片語

input(n.)輸入A keyboard gives the computer its input.鍵盤把輸入交給電腦。output(n.)輸出The sound from the speakers is output.喇叭發出的聲音是輸出。device(n.)裝置A mouse is a small device that you move with your hand.滑鼠是一個用手移動的小裝置。press(v.)按;按下Press the space bar to start the game.按空白鍵開始遊戲。release(v.)放開Release the key when you hear the beep.聽到嗶一聲就放開按鍵。layout(n.)配置;版面安排A French keyboard has a different layout.法文鍵盤的配置不一樣。font(n.)字型She chose a larger font for the title.她幫標題選了比較大的字型。convert(v.)轉換A microphone converts sound into electrical signals.麥克風把聲音轉換成電訊號。

Quick Check · 小測驗

1. What does a keyboard send when you press the A key?

2. What changes when you hold Shift and press the A key?

3. In memory, the character a is

4. What does a font give the computer?

5. Which of these is an output device?

Try It in the Model · 在模型裡試試

Four key presses to watch 四次值得看的按鍵

Then tap a row in the list of stops to jump straight to that stop, or tap a key in the 3D model.
接著可以點右邊清單裡的任何一站直接跳過去,或直接點 3D 模型裡的鍵。

Press A按下 A

Five stops, five forms · 五站,五種樣子

Follow the dot all the way. At which stop does the key first become a letter?
跟著光點走完全程。這個鍵是在哪一站才第一次變成一個字母?

Shift + AShift+A

Same key number, different character · 鍵的編號一樣,字元不一樣

Now Shift is held down. Which stop still shows the same number as before, and which ones change?
這次按住 Shift。哪一站的數字和剛才一樣?哪幾站變了?

Shift + 1Shift+1

The 1 key types “!” · 1 鍵打出「!」

The key says 1 on top, but an exclamation mark appears. Who decided that: the keyboard or the computer?
鍵上面寫的是 1,出現的卻是驚嘆號。這是誰決定的:鍵盤,還是電腦?

The space bar空白鍵

No pixels, but still a character · 一個像素都不亮,可是還是一個字元

Watch the memory cells and the screen. Is a space nothing at all?
注意看記憶體的格子和螢幕。空白真的什麼都沒有嗎?

Game · 小遊戲

What Is It Now? 現在它是什麼樣子?

A key press takes three forms on its way: a key number, a character number, and lit pixels. Eight questions. For each one, choose the form that fits.
一次按鍵在路上有三種樣子:鍵的編號、字元的編號、亮起來的像素。一共八題,每一題選出符合的那一種。

Right on the first try · 第一次就答對 0 / 0

Game · 小遊戲

Input or Output? 輸入還是輸出?

Input devices bring things into the computer. Output devices bring things out to you. Some devices do both. Eight devices: decide which kind each one is.
輸入裝置把東西送進電腦,輸出裝置把東西送出來給你,有些裝置兩樣都做。一共八種裝置,分辨每一種是哪一類。

Right on the first try · 第一次就答對 0 / 0

The first seven follow Britannica’s lists of input and output devices. The touch screen is our own example of what Britannica calls a device that provides both.前七種依照大英百科列出的輸入與輸出裝置。觸控螢幕是我們自己舉的例子,說明大英百科所說「兩樣都提供」的裝置。

Try It · 自己試試

Ask Your Own Keyboard 問問自己的鍵盤

Your web browser can tell a page two different things about a key press: which key it was, and what it typed. Click the box, then press a key. Press it again while holding Shift, and see which of the two answers changes.
瀏覽器可以告訴網頁關於一次按鍵的兩件事:按的是哪一個鍵,以及打出了什麼。先點一下框框,再按一個鍵;按住 Shift 再按一次,看看這兩個答案是哪一個變了。

Which key · 哪一個鍵KeyboardEvent.code
—
What it typed · 打出什麼KeyboardEvent.key
—
Character number · 字元的編號
—
As eight bits · 八個位元
—

Nothing pressed yet. This needs a keyboard with real keys.還沒有按任何鍵。這個小工具需要有實體按鍵的鍵盤。

This box shows your key presses only on your own screen. Nothing is sent anywhere. The names such as KeyA are the browser’s own names for keys; they are not the USB key numbers used in the model above.這個框框只把你按的鍵顯示在你自己的螢幕上,不會送到任何地方。KeyA 這類名稱是瀏覽器自己給鍵取的名字,不是上面模型用的 USB 鍵編號。

  • “Which key” stays the same with Shift. “What it typed” changes.「哪一個鍵」按不按 Shift 都一樣;「打出什麼」會變。
  • Try a key that types nothing, such as an arrow key. It still has a name.試試不會打出字的鍵,例如方向鍵。它還是有名字。
  • If your computer has another keyboard layout, the same key may type a different character.如果你的電腦設了別的鍵盤配置,同一個鍵可能打出不一樣的字元。

Stories Behind the Keys · 按鍵的故事

A key that reports twice, one keyboard for many languages, a typewriter without Shift, and letters without shapes 回報兩次的鍵、一個鍵盤打很多種語言、沒有 Shift 的打字機、沒有形狀的字母

Four short stories about what a key press really is.
關於「一次按鍵到底是什麼」的四個小故事。

Down and up · 按下與放開

A key reports twice一個鍵回報兩次

Microsoft’s guide for programmers explains that each key on a keyboard has a unique value called a scan code, and that a keyboard generates two scan codes when you type a key: one when you press it and another when you release it. That is how a game knows you are still holding a key down, and how the computer knows that Shift is still held while you press something else.
微軟寫給程式設計師的說明提到:鍵盤上每個鍵都有一個獨一無二的值,叫做掃描碼(scan code);你打一個鍵,鍵盤會產生兩個掃描碼,按下去一個,放開又一個。遊戲就是這樣知道你還按著某個鍵沒放,電腦也是這樣知道你按別的鍵時 Shift 還按著。

Y and Z · Y 和 Z

One keyboard, many languages一個鍵盤,很多種語言

The USB keyboard standard gives an example. On a North American keyboard there is a Y key; in Germany the key in that position is typically Z. The standard says the maker should not change the electronics. Both keyboards send the same key number, and only the letter printed on the key is different. The computer’s layout setting decides which letter it means.
USB 鍵盤標準裡舉了一個例子。北美的鍵盤上有一個 Y 鍵,在德國,同一個位置的鍵通常是 Z。標準說,製造商不必更動裡面的電子零件:兩種鍵盤送出同一個鍵的編號,不一樣的只有印在鍵帽上的字母。到底是哪個字母,由電腦的鍵盤配置設定決定。

1878

The first typewriter had no Shift第一台打字機沒有 Shift

According to Britannica, the first practical typewriter was built by the American inventor Christopher Latham Sholes, patented in 1868, and sold from 1874 by the Remington company. It wrote capital letters only. The first shift-key typewriter, the Remington Model 2, appeared in 1878: each bar carried two letters, a capital and a small one, and the shift key chose between them. Britannica adds that the positions of the characters on that early keyboard conform almost exactly to the arrangement that is now universal.
根據大英百科,第一台實用的打字機由美國發明家蕭爾斯(Christopher Latham Sholes)製造,1868 年取得專利,1874 年起由雷明頓公司販售。它只能打大寫字母。第一台有 Shift 鍵的打字機是 1878 年的雷明頓二號:每根字桿上有兩個字,一大寫一小寫,由 Shift 鍵決定用哪一個。大英百科還說,那台早期機器上各個字元的位置,和現在通用的排法幾乎完全一樣。

Character and glyph · 字元與字形

A character has no shape of its own字元自己沒有形狀

The Unicode Standard’s glossary keeps two ideas apart. A character is what is stored: a number. A glyph is a shape used to show it. A font is “a collection of glyphs used for the visual depiction of character data,” and rendering is the process of choosing glyphs and making them visible on a display. So the 97 in memory is not round or tall or bold. It gets a shape only at the last stop.
Unicode 標準的詞彙表把兩個概念分得很清楚。字元(character)是存起來的東西:一個數。字形(glyph)是用來顯示它的形狀。字型(font)是「一整套用來把字元資料顯示出來的字形」,而算繪(rendering)就是挑選字形、讓它們在顯示器上看得見的過程。所以記憶體裡的 97 沒有圓不圓、高不高、粗不粗的問題。它到最後一站才有形狀。

Myth vs. Fact · 常見迷思

Four things people get wrong 四個常見的誤會

✗ Myth · 迷思The keyboard sends the letter A to the computer.鍵盤把字母 A 送給電腦。

✓ Fact · 事實It sends a number that says which key was pressed. The computer decides which character that key means.它送的是一個編號,說的是哪一個鍵被按了。這個鍵代表哪個字元,是電腦決定的。

✗ Myth · 迷思Holding Shift makes the A key send something different.按住 Shift,A 鍵送出的東西就不一樣。

✓ Fact · 事實The USB keyboard standard says a key does not send extra codes because of Shift. The A key sends the same number either way; Shift is reported separately.USB 鍵盤標準寫明,鍵不會因為 Shift 而多送別的碼。A 鍵送的編號都一樣,Shift 是另外回報的。

✗ Myth · 迷思The letter printed on a key decides what it types.鍵上印的字母,決定它打出什麼。

✓ Fact · 事實The printing is only a label for you. The computer’s keyboard layout setting decides, which is why one keyboard can type in many languages.印在上面的字只是給你看的標籤。決定的是電腦的鍵盤配置設定,所以同一個鍵盤可以打很多種語言。

✗ Myth · 迷思A space is nothing.空白就是什麼都沒有。

✓ Fact · 事實A space is a character with its own number, 32, and it takes up room in memory like any letter. It just lights no pixels.空白是一個字元,有自己的編號 32,和任何字母一樣要占記憶體。它只是不點亮任何像素。

Remember It · 記憶口訣

One key press in a sentence 一句話記住一次按鍵

In, work, out進來、處理、出去

Input, processing, output.
輸入、處理、輸出。

Keys send keys, not letters鍵送的是鍵,不是字母

The keyboard says which key. The computer says which character.
鍵盤說是哪個鍵;電腦說是哪個字元。

Same key, two characters同一個鍵,兩個字元

a is 97. A is 65. One key.
a 是 97,A 是 65,同一個鍵。

Shape comes last形狀最後才來

Memory keeps the number. The font gives the shape.
記憶體放的是編號;形狀是字型給的。

Before You Start · 動手之前

A few reminders 幾個提醒

  • Do not pull the keys off a keyboard to look at the switches. On many keyboards they break or do not go back on.不要為了看開關而把鍵帽拔下來。很多鍵盤的鍵一拔就壞,或裝不回去。
  • Never type a password into a page or program that is only showing you which keys you press.只是用來顯示你按了什麼鍵的網頁或程式,絕對不要在裡面打密碼。
  • Do not change the keyboard layout on a school or family computer without asking. If you change it, change it back.沒有問過,不要改學校或家裡電腦的鍵盤配置。改了就要改回來。
  • Use a school or family computer only with permission.用學校或家裡的電腦要先得到同意。

Classroom Activity 1 · 課堂活動一

The Key Press Relay 按鍵接力

You need · 準備材料

  • Five desks in a row, labeled Keyboard, Cable, Processor, Memory, and Screen排成一排的五張桌子,分別標上:鍵盤、線、處理器、記憶體、螢幕
  • Small cards and pencils小卡片和鉛筆
  • A lookup sheet for the Processor desk: key 4 → a (97), key 4 with Shift → A (65), key 30 → 1 (49), key 30 with Shift → ! (33), key 44 → space (32)給「處理器」那一桌的對照表:第 4 號鍵 → a(97)、第 4 號鍵加 Shift → A(65)、第 30 號鍵 → 1(49)、第 30 號鍵加 Shift → !(33)、第 44 號鍵 → 空白(32)
  • Squared paper for the Screen desk, with a grid 5 squares across and 7 down給「螢幕」那一桌的方格紙,畫好橫 5 格、直 7 格的格子

Steps · 步驟

  1. The teacher whispers a key to the Keyboard student, for example “the A key, with Shift.” The Keyboard writes only a key number on a card, 4, and adds “Shift” if it is held. No letters allowed.老師小聲告訴「鍵盤」同學一個鍵,例如「A 鍵,加 Shift」。「鍵盤」只能在卡片上寫鍵的編號 4,有按 Shift 就加寫「Shift」。不可以寫字母。
  2. The Cable carries the card to the Processor, who uses the lookup sheet and writes the character number on a new card: 65.「線」把卡片送給「處理器」。「處理器」查對照表,在新的卡片上寫下字元的編號:65。
  3. Memory writes that number as eight bits, 01000001, and passes it on.「記憶體」把那個數寫成八個位元 01000001,再傳下去。
  4. The Screen turns the bits back into a number, finds the character, and colors in squares on the grid to draw it. The class reads the screen: is it the key the teacher whispered?「螢幕」把位元換回數字、找出是哪個字元,在方格上塗出它的樣子。全班看螢幕:是老師小聲說的那個鍵嗎?

Ask afterward: which student was the first to know it was a letter? Then let two Screen students draw the same character. Their drawings will differ a little, and that is what a font is. In Taiwan’s junior high Information Technology curriculum, this lesson matches the topic “System platforms”: 資 S-IV-2, whose notes list input and output.
做完問大家:哪一位同學是第一個知道它是字母的人?再請兩位「螢幕」同學畫同一個字元,兩個人畫的會有一點不一樣,這就是字型。對照十二年國教國中「資訊科技」的學習內容,這一課對應「系統平台」主題:資 S-IV-2 系統平台之組成架構與基本運作原理(附錄的說明列有輸入輸出)。

Classroom Activity 2 · 課堂活動二

Check It on Your Own Computer 在自己的電腦上驗證

You need · 準備材料

  • A computer with a keyboard that has real keys一台有實體鍵盤的電腦
  • The “Ask Your Own Keyboard” box on this page這一頁的「問問自己的鍵盤」那個框框
  • Paper and a pencil紙和鉛筆

Steps · 步驟

  1. Click the box and press the A key. Write down the two answers: which key, and what it typed.點一下框框,按 A 鍵。把兩個答案寫下來:哪一個鍵、打出什麼。
  2. Hold Shift and press A again. Which answer changed, and which stayed the same?按住 Shift 再按一次 A。哪一個答案變了?哪一個沒變?
  3. Do the same with the 1 key and with the space bar. Write the character number for each.用 1 鍵和空白鍵各做一次,把每個字元的編號寫下來。
  4. If your keyboard has a number pad, press the 1 there, and then the 1 above the letters. Both type 1. Do they have the same key name?如果你的鍵盤有數字鍵區,按那裡的 1,再按字母上方的 1。兩個都打出 1,它們的鍵名一樣嗎?

With the U.S. layout you should find: A key, a = 97 and A = 65; 1 key, 1 = 49 and ! = 33; space bar, 32. The two numbers for a and A differ by exactly 32, which is one bit. If your numbers are different, your computer is probably set to another keyboard layout, and that is the lesson too.
用美式配置應該會看到:A 鍵,a=97、A=65;1 鍵,1=49、!=33;空白鍵 32。a 和 A 這兩個數剛好差 32,也就是只差一個位元。如果你看到的數字不一樣,你的電腦大概設了別的鍵盤配置——這也正是這一課要說的事。

Sources · 資料出處

Facts on this page were checked against these sources (October 2026); the model and its small letter shapes are our own illustration, and its rules are tested · 本頁的事實依下列資料查證(2026 年 10 月);模型和裡面小小的字形是我們自己的示意,規則有測試

  1. Usage 0x04 is “Keyboard a and A,” 0x1E is “Keyboard 1 and !,” 0x2C is “Keyboard Spacebar”; a key “does not send extra codes to compensate for the state of any Control, Alt, Shift or Num Lock keys”; the Y key on a North American keyboard is typically Z in Germany, and the vendor should use the Y usage on both編號 0x04 是「Keyboard a and A」、0x1E 是「Keyboard 1 and !」、0x2C 是「Keyboard Spacebar」;鍵不會因為 Control、Alt、Shift、Num Lock 的狀態而多送別的碼;北美鍵盤的 Y 鍵在德國通常是 Z,製造商在兩種鍵盤上都應該用 Y 的編號USB Implementers Forum, HID Usage Tables for Universal Serial Bus (USB), Version 1.5, section 10, “Keyboard/Keypad Page (0x07)” ↗
  2. “Assigned to each key on a keyboard is a unique value called a scan code, a device-dependent identifier for the key”; a keyboard generates two scan codes when the user types a key, one on press and one on release; the keyboard layout translates scan codes into messages for the application鍵盤上每個鍵都有一個獨一無二的值,叫掃描碼,是隨裝置而定的鍵識別碼;使用者打一個鍵,鍵盤產生兩個掃描碼(按下一個、放開一個);鍵盤配置把掃描碼轉成給應用程式的訊息Microsoft Learn, “About Keyboard Input” ↗
  3. KeyboardEvent.code “represents a physical key on the keyboard (as opposed to the character generated by pressing the key)” and is not altered by the keyboard layout or the modifier keys; KeyboardEvent.key returns the value of the key pressed, taking into consideration modifier keys such as Shift and the keyboard locale and layoutKeyboardEvent.code 代表鍵盤上實體的那個鍵(不是按下它產生的字元),不受鍵盤配置與修飾鍵影響;KeyboardEvent.key 回傳按下的鍵的值,會考慮 Shift 這類修飾鍵以及鍵盤的語系與配置MDN Web Docs, “KeyboardEvent: code property” and “KeyboardEvent: key property” ↗
  4. An input device converts incoming data and instructions into a pattern of electrical signals in binary code; an output device reverses the process; input devices include keyboards, the mouse, microphones, and webcams; output equipment includes video displays, printers, loudspeakers, and headphones; some devices may provide both input and output輸入裝置把進來的資料與指令轉換成二進位碼的電訊號;輸出裝置把這個過程反過來;輸入裝置包括鍵盤、滑鼠、麥克風、網路攝影機;輸出設備包括顯示器、印表機、喇叭、耳機;有些裝置同時提供輸入和輸出The Editors of Encyclopaedia Britannica, “peripheral device” (revised by Erik Gregersen) ↗
  5. Sholes built the first practical typewriter; patented June 23, 1868; on the market in 1874 and soon renamed the Remington; the first typewriter wrote capital letters only; the first shift-key typewriter, the Remington Model 2, appeared in 1878; the positions of the characters conform almost exactly to the arrangement that is now universal蕭爾斯造出第一台實用的打字機;1868 年 6 月 23 日取得專利;1874 年上市,不久改名雷明頓;第一台打字機只能打大寫;第一台有 Shift 鍵的打字機(雷明頓二號)1878 年問世;字元的位置和現在通用的排法幾乎完全一樣The Editors of Encyclopaedia Britannica, “typewriter” ↗
  6. Font: “A collection of glyphs used for the visual depiction of character data”; rendering: the process of selecting and laying out glyphs to depict characters, and of making glyphs visible on a display device字型:一整套用來把字元資料顯示出來的字形;算繪:挑選並排列字形來呈現字元、讓字形在顯示裝置上看得見的過程Unicode Consortium, “Glossary of Unicode Terms” ↗
  7. A = 65 and a = 97 in ASCII (see Lesson 2)ASCII 裡 A=65、a=97(見第二課)Encyclopaedia Britannica, “ASCII” ↗
  8. Taiwan terms: output device 輸出裝置, peripheral device 週邊裝置, scan code 掃描碼, font 字型. For keyboard layout the term bank gives 鍵盤布局; this page uses 鍵盤配置, the wording more common in Taiwan’s software台灣用語:output device 輸出裝置、peripheral device 週邊裝置、scan code 掃描碼、font 字型。keyboard layout 樂詞網作「鍵盤布局」;本頁用台灣軟體介面較常見的「鍵盤配置」國家教育研究院《樂詞網》 ↗
  9. 資 S-IV-2, how system platforms are built and basically work (p. 10); the notes list the operating system, CPU, memory, and input and output (p. 43)資 S-IV-2 系統平台之組成架構與基本運作原理(第 10 頁);附錄三的說明:「系統軟硬體架構與運作原理:作業系統、CPU、記憶體、輸入輸出」(第 43 頁)教育部《十二年國民基本教育課程綱要 國民中學暨普通型高級中等學校 科技領域》(2018) ↗
  10. The model: a = 97 = 01100001, A = 65 = 01000001, 1 = 49, ! = 33, space = 32; 97 − 65 = 32; 0x04 = 4, 0x1E = 30, 0x2C = 44; the 5 × 7 letter shapes are our own模型:a=97=01100001、A=65=01000001、1=49、!=33、空白=32;97 − 65=32;0x04=4、0x1E=30、0x2C=44;5 × 7 的字形是自己畫的Our own illustration, checked by tools/computers/test/keypath.test.mjs ↗