--- nono/wx/wxsoftkey.h 2026/04/29 17:05:04 1.1.1.9 +++ nono/wx/wxsoftkey.h 2026/04/29 17:05:07 1.1.1.10 @@ -12,6 +12,7 @@ #include "keyboard.h" #include "vm.h" #include +#include #include // キー描画用のデータ構造体 @@ -86,24 +87,24 @@ class WXSoftKeyPanel : public WXTextPane void DrawEnterMark(wxDC& dc, const wxPoint& basep); virtual int DrawLED(wxDC& dc, const keydata_t& key) = 0; const keydata_t& FindKeydata(uint) const; - static bool IsShiftKey(uint keycode); void OnLeftDown(wxMouseEvent& event); - void DoLeftDown(const keydata_t *key); + void DoLeftDown(uint code); void OnLeftUp(wxMouseEvent& event); void OnLeftDClick(wxMouseEvent& event); void OnRightDown(wxMouseEvent& event); - void KeyDown(const keydata_t& key); - void KeyUp(const keydata_t& key); + void KeyDown(uint code); + void KeyUp(uint code); const keydata_t *GetKeydataFromPoint(const wxPoint& pt) const; // 左クリック押下時のキー - const keydata_t *leftdown_key {}; + uint leftdown_key {}; - // SHIFT キー長押し中なら true。 - // SHIFT 状態でのみ意味を持つので事前に gKeyboard->IsShift() 確認すること。 - bool shift_hold {}; + // トグル動作にするキーの集合。 + // first はキーコード、 + // second は押下ならキーコード、開放なら 0。 + std::map toggle {}; // 修飾キーの状態 (刻印を変更するため) Modifier modifier {};