Press A按下 A
Follow the dot all the way. At which stop does the key first become a letter?
跟著光點走完全程。這個鍵是在哪一站才第一次變成一個字母?
How Computers Work · Unit 2 · Lesson 8 · 電腦概論 單元二 第八課
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 裡跟著一個鍵走一趟:從鍵盤出發,沿著線,經過處理器和記憶體,走到螢幕。每一站它都是不一樣的東西:一個開關、一個鍵的編號、一個字元的編號、八個位元,最後是一片像素。接著猜猜它在每一站是什麼、分辨輸入和輸出,再測測自己鍵盤上的鍵。
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 模型
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 模型;下面的按鍵和五站清單照樣能用,課文和小遊戲也都能用。
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 · 英文閱讀
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.
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.
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.
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.
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.
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.
Questions · 閱讀理解
What does a keyboard send to the computer when you press a key?
Why do a and A come from the same key but have different numbers in memory?
Name one input device and one output device, and say what each one does.
Words & Phrases · 生字及片語
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 · 在模型裡試試
Then tap a row in the list of stops to jump straight to that stop, or tap a key in the 3D model.
接著可以點右邊清單裡的任何一站直接跳過去,或直接點 3D 模型裡的鍵。
Follow the dot all the way. At which stop does the key first become a letter?
跟著光點走完全程。這個鍵是在哪一站才第一次變成一個字母?
Now Shift is held down. Which stop still shows the same number as before, and which ones change?
這次按住 Shift。哪一站的數字和剛才一樣?哪幾站變了?
The key says 1 on top, but an exclamation mark appears. Who decided that: the keyboard or the computer?
鍵上面寫的是 1,出現的卻是驚嘆號。這是誰決定的:鍵盤,還是電腦?
Watch the memory cells and the screen. Is a space nothing at all?
注意看記憶體的格子和螢幕。空白真的什麼都沒有嗎?
Game · 小遊戲
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 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 · 自己試試
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 再按一次,看看這兩個答案是哪一個變了。
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 鍵編號。
Stories Behind the Keys · 按鍵的故事
Four short stories about what a key press really is.
關於「一次按鍵到底是什麼」的四個小故事。
Down and up · 按下與放開
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
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
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 · 字元與字形
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 · 常見迷思
✗ 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 · 記憶口訣
Input, processing, output.
輸入、處理、輸出。
The keyboard says which key. The computer says which character.
鍵盤說是哪個鍵;電腦說是哪個字元。
a is 97. A is 65. One key.
a 是 97,A 是 65,同一個鍵。
Memory keeps the number. The font gives the shape.
記憶體放的是編號;形狀是字型給的。
Before You Start · 動手之前
Classroom Activity 1 · 課堂活動一
You need · 準備材料
Steps · 步驟
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 · 課堂活動二
You need · 準備材料
Steps · 步驟
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,也就是只差一個位元。如果你看到的數字不一樣,你的電腦大概設了別的鍵盤配置——這也正是這一課要說的事。
Go Further · 延伸閱讀
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 月);模型和裡面小小的字形是我們自己的示意,規則有測試