每特17劃

及時當勉勵 2004-06-07

Iterm's work

Iterm’s work

昨天弄到半夜二點, 終於能在iterm上顯示iiimcf的輸入結果. 感謝 jserv和 thhsieh 的熱心, 跟他們聊的過程中, 得到了很多的建議和提示. Anyway, 是值得紀念的日子.


第一個考驗

第一個考驗

時間差不多了, 準備出發往中壢. 這次投靠的經驗不同以往, 自己一個人拿鑰匙去投宿. 坐沒試過的中壢客運. 考沒有考過的考題. 我能有什麼樣的表現呢?


Gaim-Blogger

Gaim-Blogger

gaim-blogger is a gaim’s plugin to blogging directly via Gaim. It’s really funny and creative. :-) The idea might become a killer feature. Imagine that if we could read, write, and notify not only blogs but also RSS/ATOM seeds, the latency to open a blog-viewer will be reduced and the instantaneity will be improved. Gaim and its plugins are great, isn’t it. :-)


Extended keyborad event.

Extended keyborad event.

ASCII只有定義128個鍵, 而一個"char"有一個byte=8 bit的定義空間. 還有128個鍵可以由程式設計師自定義. 比如說, 你需要在程式裡補捉"Ctrl-Space", “Ctrl-Shift”…等. 你可以適當地擴充鍵盤對映(keymaps)使鍵盤的事件可以收在一個"char"可以定義的範圍, 而不用處理低階的"keycode". 相關的資訊可以參照"man keymaps", 也是常用的表頭檔. 在iterm, zhcon,…等一類的程式也都有很棒的範例在裡頭.


about the console keyboard

about the console keyboard

在console上有三種主要的鍵盤呈現, 分別是: scancode( raw code), keycode, keychar. scancode就是硬體所送出的數位訊息, 隨pc, mac, …不同的硬體平台而不同. keycode則是由程式所定義的鍵盤事件, linux kernel有定義, Xwindow也有另一個定義. keychar就是我們熟知的ASCII字碼, 是一致不變的. 在console擷取鍵盤事件, 需要透過一些低階的I/O技巧,才能取得類似像Ctrl+Space這一類的鍵盤事件. 這裡有一篇很棒的Console Programming Howto: http://devel.linvision.com/doc/fbh/current/ 在4th section對keystroke有很好的指導.