Download Demo/KeyBitMap.txt from hschumann2/TempleOS-Source-Code: direct link, hf CLI and curl.
- Browser
- Download file 680 Bytes
-
https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/KeyBitMap.txt
- Command line
-
hf download hf://datasets/hschumann2/TempleOS-Source-Code/Demo/KeyBitMap.txt
-
curl -L -o KeyBitMap.txt https://huggingface.co/datasets/hschumann2/TempleOS-Source-Code/resolve/main/Demo/KeyBitMap.txt
680 Bytes
| <1>/* Graphics Not Rendered in HTML */ | |
| I64 x=0; | |
| U0 DrawIt(CTask *,CDC *dc) | |
| { | |
| Sprite3(dc,x%100,100,0,<1>); | |
| } | |
| U0 KeyDownBitMapDemo() | |
| { | |
| //This conversion routine is slow. | |
| I64 i_sc=Char2ScanCode('i'); | |
| "Press and hold $GREEN$'i'$FG$.\n"; | |
| while (!Bt(kbd.down_bitmap,i_sc)) | |
| Yield; | |
| SettingsPush; //See SettingsPush | |
| Fs->draw_it=&DrawIt; | |
| //kbd.down_bitmap is indexed with the | |
| //merged scan code. (left shift and | |
| //right shift combined for example.) | |
| //kbd.down_bitmap2 is indexed with the | |
| //distinct scan code. See Char and Scan Codes. | |
| while (Bt(kbd.down_bitmap,i_sc)) { | |
| x++; | |
| Sleep(10); | |
| } | |
| SettingsPop; | |
| FlushMsgs; | |
| } | |
| KeyDownBitMapDemo; | |