Kody klawiszy
From Atariki
Wersja z dnia 13:15, 30 kwi 2010 0xF (Dyskusja | wkład) (jak już piszemy o F1-F4, to warto podać ich kody) ← Previous diff |
Wersja z dnia 20:38, 13 lis 2010 Mono (Dyskusja | wkład) (uzupełnienie niektórych kombinacji z CONTROL i SHIFT) Next diff → |
||
Linia 2: | Linia 2: | ||
<table border=1 cellpadding=5> | <table border=1 cellpadding=5> | ||
- | <tr><td><b>Kod dec</b></td><td><b>Kod hex</b></td><td><b>Klawisz</b></td></tr> | + | <tr><td><b>Kod dec</b></td><td><b>Kod hex</b></td><td><b>Klawisz</b></td><td><b>Klawisz z SHIFT</b></td><td><b>Klawisz z CONTROL</b></td></tr> |
- | <tr><td>0</td><td>$00</td><td>L</td></tr> | + | <tr><td>0</td><td>$00</td><td>l</td><td>L</td><td></td></tr> |
- | <tr><td>1</td><td>$01</td><td>J</td></tr> | + | <tr><td>1</td><td>$01</td><td>j</td><td>J</td><td></td></tr> |
- | <tr><td>2</td><td>$02</td><td>;</td></tr> | + | <tr><td>2</td><td>$02</td><td>;</td><td>:</td><td></td></tr> |
- | <tr><td>3</td><td>$03</td><td>F1</td></tr> | + | <tr><td>3</td><td>$03</td><td>F1</td><td></td><td></td></tr> |
- | <tr><td>4</td><td>$04</td><td>F2</td></tr> | + | <tr><td>4</td><td>$04</td><td>F2</td><td></td><td></td></tr> |
- | <tr><td>5</td><td>$05</td><td>K</td></tr> | + | <tr><td>5</td><td>$05</td><td>k</td><td>K</td><td></td></tr> |
- | <tr><td>6</td><td>$06</td><td>+</td></tr> | + | <tr><td>6</td><td>$06</td><td>+</td><td>\</td><td>strzałka w lewo</td></tr> |
- | <tr><td>7</td><td>$07</td><td>*</td></tr> | + | <tr><td>7</td><td>$07</td><td>*</td><td>^</td><td>strzałka w prawo</td></tr> |
- | <tr><td>8</td><td>$08</td><td>O</td></tr> | + | <tr><td>8</td><td>$08</td><td>o</td><td>O</td><td></td></tr> |
- | <tr><td>9</td><td>$09</td><td></td></tr> | + | <tr><td>9</td><td>$09</td><td></td><td></td><td></td></tr> |
- | <tr><td>10</td><td>$0a</td><td>P</td></tr> | + | <tr><td>10</td><td>$0a</td><td>p</td><td>P</td><td></td></tr> |
- | <tr><td>11</td><td>$0b</td><td>U</td></tr> | + | <tr><td>11</td><td>$0b</td><td>u</td><td>U</td><td></td></tr> |
- | <tr><td>12</td><td>$0c</td><td>RETURN</td></tr> | + | <tr><td>12</td><td>$0c</td><td>RETURN</td><td></td><td></td></tr> |
- | <tr><td>13</td><td>$0d</td><td>I</td></tr> | + | <tr><td>13</td><td>$0d</td><td>i</td><td>I</td><td></td></tr> |
- | <tr><td>14</td><td>$0e</td><td>-</td></tr> | + | <tr><td>14</td><td>$0e</td><td>-</td><td>_</td><td>strzałka w górę</td></tr> |
- | <tr><td>15</td><td>$0f</td><td>=</td></tr> | + | <tr><td>15</td><td>$0f</td><td>=</td><td>|</td><td>strzałka w dół</td></tr> |
- | <tr><td>16</td><td>$10</td><td>V</td></tr> | + | <tr><td>16</td><td>$10</td><td>v</td><td>V</td><td></td></tr> |
- | <tr><td>17</td><td>$11</td><td>HELP</td></tr> | + | <tr><td>17</td><td>$11</td><td>HELP</td><td></td><td></td></tr> |
- | <tr><td>18</td><td>$12</td><td>C</td></tr> | + | <tr><td>18</td><td>$12</td><td>c</td><td>C</td><td></td></tr> |
- | <tr><td>19</td><td>$13</td><td>F3</td></tr> | + | <tr><td>19</td><td>$13</td><td>F3</td><td></td><td></td></tr> |
- | <tr><td>20</td><td>$14</td><td>F4</td></tr> | + | <tr><td>20</td><td>$14</td><td>F4</td><td></td><td></td></tr> |
- | <tr><td>21</td><td>$15</td><td>B</td></tr> | + | <tr><td>21</td><td>$15</td><td>b</td><td>B</td><td></td></tr> |
- | <tr><td>22</td><td>$16</td><td>X</td></tr> | + | <tr><td>22</td><td>$16</td><td>x</td><td>X</td><td></td></tr> |
- | <tr><td>23</td><td>$17</td><td>Z</td></tr> | + | <tr><td>23</td><td>$17</td><td>z</td><td>Z</td><td></td></tr> |
- | <tr><td>24</td><td>$18</td><td>4</td></tr> | + | <tr><td>24</td><td>$18</td><td>4</td><td>$</td><td></td></tr> |
- | <tr><td>25</td><td>$19</td><td></td></tr> | + | <tr><td>25</td><td>$19</td><td></td><td></td><td></td></tr> |
- | <tr><td>26</td><td>$1a</td><td>3</td></tr> | + | <tr><td>26</td><td>$1a</td><td>3</td><td>#</td><td>EOF</td></tr> |
- | <tr><td>27</td><td>$1b</td><td>6</td></tr> | + | <tr><td>27</td><td>$1b</td><td>6</td><td>&</td><td></td></tr> |
- | <tr><td>28</td><td>$1c</td><td>ESC</td></tr> | + | <tr><td>28</td><td>$1c</td><td>ESC</td><td></td><td></td></tr> |
- | <tr><td>29</td><td>$1d</td><td>5</td></tr> | + | <tr><td>29</td><td>$1d</td><td>5</td><td>%</td><td></td></tr> |
- | <tr><td>30</td><td>$1e</td><td>2</td></tr> | + | <tr><td>30</td><td>$1e</td><td>2</td><td>"</td><td>BELL</td></tr> |
- | <tr><td>31</td><td>$1f</td><td>1</td></tr> | + | <tr><td>31</td><td>$1f</td><td>1</td><td>!</td><td>przełączanie blokady E:</td></tr> |
- | <tr><td>32</td><td>$20</td><td>,</td></tr> | + | <tr><td>32</td><td>$20</td><td>,</td><td>[</td><td></td></tr> |
- | <tr><td>33</td><td>$21</td><td>SPACE</td></tr> | + | <tr><td>33</td><td>$21</td><td>SPACE</td><td></td><td></td></tr> |
- | <tr><td>34</td><td>$22</td><td>.</td></tr> | + | <tr><td>34</td><td>$22</td><td>.</td><td>]</td><td></td></tr> |
- | <tr><td>35</td><td>$23</td><td>N</td></tr> | + | <tr><td>35</td><td>$23</td><td>n</td><td>N</td><td></td></tr> |
- | <tr><td>36</td><td>$24</td><td></td></tr> | + | <tr><td>36</td><td>$24</td><td></td><td></td><td></td></tr> |
- | <tr><td>37</td><td>$25</td><td>M</td></tr> | + | <tr><td>37</td><td>$25</td><td>m</td><td>M</td><td></td></tr> |
- | <tr><td>38</td><td>$26</td><td>/</td></tr> | + | <tr><td>38</td><td>$26</td><td>/</td><td>?</td><td></td></tr> |
- | <tr><td>39</td><td>$27</td><td>LOGO</td></tr> | + | <tr><td>39</td><td>$27</td><td>LOGO</td><td></td><td></td></tr> |
- | <tr><td>40</td><td>$28</td><td>R</td></tr> | + | <tr><td>40</td><td>$28</td><td>r</td><td>R</td><td></td></tr> |
- | <tr><td>41</td><td>$29</td><td></td></tr> | + | <tr><td>41</td><td>$29</td><td></td><td></td><td></td></tr> |
- | <tr><td>42</td><td>$2a</td><td>E</td></tr> | + | <tr><td>42</td><td>$2a</td><td>e</td><td>E</td><td></td></tr> |
- | <tr><td>43</td><td>$2b</td><td>Y</td></tr> | + | <tr><td>43</td><td>$2b</td><td>y</td><td>Y</td><td></td></tr> |
- | <tr><td>44</td><td>$2c</td><td>TAB</td></tr> | + | <tr><td>44</td><td>$2c</td><td>TAB</td><td>Set - ustawienie pozycji tabulacji</td><td>Clr - skasowanie pozycji tabulacji</td></tr> |
- | <tr><td>45</td><td>$2d</td><td>T</td></tr> | + | <tr><td>45</td><td>$2d</td><td>t</td><td>T</td><td></td></tr> |
- | <tr><td>46</td><td>$2e</td><td>W</td></tr> | + | <tr><td>46</td><td>$2e</td><td>w</td><td>W</td><td></td></tr> |
- | <tr><td>47</td><td>$2f</td><td>Q</td></tr> | + | <tr><td>47</td><td>$2f</td><td>q</td><td>Q</td><td></td></tr> |
- | <tr><td>48</td><td>$30</td><td>9</td></tr> | + | <tr><td>48</td><td>$30</td><td>9</td><td>(</td><td></td></tr> |
- | <tr><td>49</td><td>$31</td><td></td></tr> | + | <tr><td>49</td><td>$31</td><td></td><td></td><td></td></tr> |
- | <tr><td>50</td><td>$32</td><td>0</td></tr> | + | <tr><td>50</td><td>$32</td><td>0</td><td>)</td><td></td></tr> |
- | <tr><td>51</td><td>$33</td><td>7</td></tr> | + | <tr><td>51</td><td>$33</td><td>7</td><td>'</td><td></td></tr> |
- | <tr><td>52</td><td>$34</td><td>BACKSPACE</td></tr> | + | <tr><td>52</td><td>$34</td><td>BACKSPACE</td><td>Delete</td><td></td></tr> |
- | <tr><td>53</td><td>$35</td><td>8</td></tr> | + | <tr><td>53</td><td>$35</td><td>8</td><td>@</td><td></td></tr> |
- | <tr><td>54</td><td>$36</td><td><</td></tr> | + | <tr><td>54</td><td>$36</td><td><</td><td>Clear</td><td></td></tr> |
- | <tr><td>55</td><td>$37</td><td>></td></tr> | + | <tr><td>55</td><td>$37</td><td>></td><td>Insert</td><td></td></tr> |
- | <tr><td>56</td><td>$38</td><td>F</td></tr> | + | <tr><td>56</td><td>$38</td><td>f</td><td>F</td><td></td></tr> |
- | <tr><td>57</td><td>$39</td><td>H</td></tr> | + | <tr><td>57</td><td>$39</td><td>h</td><td>H</td><td></td></tr> |
- | <tr><td>58</td><td>$3a</td><td>D</td></tr> | + | <tr><td>58</td><td>$3a</td><td>d</td><td>D</td><td></td></tr> |
- | <tr><td>59</td><td>$3b</td><td></td></tr> | + | <tr><td>59</td><td>$3b</td><td></td><td></td><td></td></tr> |
- | <tr><td>60</td><td>$3c</td><td>CAPS</td></tr> | + | <tr><td>60</td><td>$3c</td><td>CAPS</td><td>przełączenie uppercase</td><td>ustawienie znaków kontrolnych</td></tr> |
- | <tr><td>61</td><td>$3d</td><td>G</td></tr> | + | <tr><td>61</td><td>$3d</td><td>g</td><td>G</td><td></td></tr> |
- | <tr><td>62</td><td>$3e</td><td>S</td></tr> | + | <tr><td>62</td><td>$3e</td><td>s</td><td>S</td><td></td></tr> |
- | <tr><td>63</td><td>$3f</td><td>A</td></tr> | + | <tr><td>63</td><td>$3f</td><td>a</td><td>A</td><td></td></tr> |
</table> | </table> | ||
Wersja z dnia 20:38, 13 lis 2010
"Surowe" kody klawiszy generowane przez klawiaturę. W dalszej fazie obróbki system operacyjny przetwarza większość z nich na kody ATASCII.
Kod dec | Kod hex | Klawisz | Klawisz z SHIFT | Klawisz z CONTROL |
0 | $00 | l | L | |
1 | $01 | j | J | |
2 | $02 | ; | : | |
3 | $03 | F1 | ||
4 | $04 | F2 | ||
5 | $05 | k | K | |
6 | $06 | + | \ | strzałka w lewo |
7 | $07 | * | ^ | strzałka w prawo |
8 | $08 | o | O | |
9 | $09 | |||
10 | $0a | p | P | |
11 | $0b | u | U | |
12 | $0c | RETURN | ||
13 | $0d | i | I | |
14 | $0e | - | _ | strzałka w górę |
15 | $0f | = | | | strzałka w dół |
16 | $10 | v | V | |
17 | $11 | HELP | ||
18 | $12 | c | C | |
19 | $13 | F3 | ||
20 | $14 | F4 | ||
21 | $15 | b | B | |
22 | $16 | x | X | |
23 | $17 | z | Z | |
24 | $18 | 4 | $ | |
25 | $19 | |||
26 | $1a | 3 | # | EOF |
27 | $1b | 6 | & | |
28 | $1c | ESC | ||
29 | $1d | 5 | % | |
30 | $1e | 2 | " | BELL |
31 | $1f | 1 | ! | przełączanie blokady E: |
32 | $20 | , | [ | |
33 | $21 | SPACE | ||
34 | $22 | . | ] | |
35 | $23 | n | N | |
36 | $24 | |||
37 | $25 | m | M | |
38 | $26 | / | ? | |
39 | $27 | LOGO | ||
40 | $28 | r | R | |
41 | $29 | |||
42 | $2a | e | E | |
43 | $2b | y | Y | |
44 | $2c | TAB | Set - ustawienie pozycji tabulacji | Clr - skasowanie pozycji tabulacji |
45 | $2d | t | T | |
46 | $2e | w | W | |
47 | $2f | q | Q | |
48 | $30 | 9 | ( | |
49 | $31 | |||
50 | $32 | 0 | ) | |
51 | $33 | 7 | ' | |
52 | $34 | BACKSPACE | Delete | |
53 | $35 | 8 | @ | |
54 | $36 | < | Clear | |
55 | $37 | > | Insert | |
56 | $38 | f | F | |
57 | $39 | h | H | |
58 | $3a | d | D | |
59 | $3b | |||
60 | $3c | CAPS | przełączenie uppercase | ustawienie znaków kontrolnych |
61 | $3d | g | G | |
62 | $3e | s | S | |
63 | $3f | a | A |
Wciśnięcie odpowiedniego klawisza z klawiszem SHIFT zwiększa kod o 64 ($40), a z klawiszem CONTROL o 128 ($80). Niektóre klawisze są niedostępne w kombinacji z SHIFT+CONTROL wciśniętymi równocześnie.
System operacyjny bada wciśnięcie klawisza HELP i w zależności od tego ustawia flagę HLPFLG (732, $02DC; zapisywany jest tam kod kombinacji klawisza HELP z ewentualnymi klawiszami SHIFT lub CONTROL).
Klawisze F1..F4 są dostępne w modelu 1200XL.
Układ sprzętowy rozpoznaje wciśnięcie kombinacji klawiszy SHIFT+CONTROL+A, aczkolwiek system operacyjny rezerwuje jej kod (255, $FF) dla oznaczenia w rejestrze KBCODES (764, $02FC) stanu, kiedy żaden klawisz nie został wciśnięty. W konsekwencji wciśnięcie tej kombinacji może być wykrywane jedynie bezpośrednio w rejestrze KBCODE (53769, $D209) lub przez własny handler przerwania klawiatury wektoryzowany przez VKEY (520, $0208). Praktycznie użycie tej kombinacji może służyć do "oszukania" systemu i anulowania informacji o ostatnio wciśniętej kombinacji klawiszy.
Wciśnięcie klawisza BREAK powoduje wygenerowanie innego przerwania IRQ, niż pozostałe klawisze. Systemowa procedura obsługi przerwania klawisza BREAK wektoryzowana przez VBRKKEY (566=$236) wpisuje wartość 0 do rejestru IRQSTATS (17=$11), procedury obsługi SIO badają i zmieniają stan tego rejestru, a informację o wciśnięciu klawisza BREAK zwracają za pomocą statusu operacji I/O.
Dodatkowa informacja o wciśnięciu bądź zwolnieniu klawisza SHIFT lub dowolnego innego klawisza (prócz BREAK, CONTROL i klawiszy konsoli) może być sprawdzana w rejestrze SKSTAT (53775, $D20F).