#include <stdio.h>
#include <Openvanilla/OpenVanilla.h>
#include <Openvanilla/OVLibrary.h>
class FoobarContext : public OVInputMethodContext {
public:
virtual int keyEvent(OVKeyCode* k, OVBuffer*, OVCandidate*,
OVService* s) {
char msg[256];
sprintf(msg, "%s", "我");
b->append(msg)->update();
s->notify(msg);
b->send( );
return 0;
}
};
以上是我修改後的程式碼,我用記事本來寫,結果按下鍵盤任一鍵就會把記事本給關了,連"我"這個字都看不到><,請問我是那寫錯了嗎?