AZO234 / NP2kai

Neko Project II kai
http://domisan.sakura.ne.jp/article/np2kai/np2kai.html
MIT License
246 stars 61 forks source link

Fixed the right shift not working. #123

Closed miyamoto999 closed 3 years ago

miyamoto999 commented 3 years ago

SDL2ポート、XポートでMS-DOS、Win98で右シフトが効かなかったので直してみました。

Windows(VS2019 build)やNP21/Wでは右シフトが効いていたのでソースコードを調べたら、キーコードが0x75ではなく0x7dが正しいようなので0x7dにしてみました。MS-DOS、Win98で効くのを確認しました。

なんとなく、更に調べてみるとそもそもWindows(VS2019 build)では右シフトと左シフトキーの区別をしていなかったのでそれも修正しました。💦


I fixed it because right shift didn't work on MS-DOS and Win98 with SDL2 port and X port.

Right shift worked on Windows (VS2019 build) and NP21/W, so I checked the source code and the keycode seems to be 0x7d instead of 0x75, so I changed it to 0x7d. I confirmed that it works on MS-DOS and Win98.

Somehow, after further investigation, I found that Windows (VS2019 build) didn't distinguish the right-shift and left-shift keys in the first place, so I fixed that too.

AZO234 commented 3 years ago

Thanks very much! I implemented RSHIFT, I minded "That's it. 😲". (And I found problem in referenced fig. https://ixsvr.dyndns.org/) Sorry to my poor checking...

winkbd.cppの、key106ext[256]の部分(121,122行目) も変更したほうが良さそうですね。

NP21/Wのお方にも見てもらおうと思っていますです。

miyamoto999 commented 3 years ago

https://ixsvr.dyndns.org/(今見れないけど)には、確か0x75って書いてありましたよね。ソース見てみるとWindows用のモードでないとき0x7d => 0x70 に変換する処理(keystat.c)があったので0x7dが正解だとわかった次第です。

key106ext[]の方は、メニューで「NumLock使わない」としているときに使用されもので、テンキー部分のHomeやEndなどの入力を数字とかに変換するためのテーブルになります。(たぶん)

なので、変更する必要はないと思います。NP21/Wのお方にも見てもらうのなら、ついでに確認を💦

AZO234 commented 3 years ago

了解です。 当方も見当違いな事を申しまして申し訳ございませんでした。😫 NP2kai実装後に、NP21/Wの方も入れてみるように連絡が通じましたよ。

OK. I merge this. Everytime thank you!! 🎉