quote:
Originally posted by Matty
It is doable using ToAcii, GetKeyboardState, GetKeyboardLayout.
It actually isn't. Also ToAscii also requires a scan code, which isn't provided by Plus!.
quote:
Originally posted by deAd
It may not be parsed when it is typed as in the script, but it is used for tags within plus!, and many other projects, so it must be common to be on keyboards.
It is not because the character [ is used as part of formatting tags, that Plus! detects it as a virtual key. Plus! parses the string you already typed and checks the ascii codes (which can be different than virtual codes). As I know you know...
quote:
Originally posted by deAd
The key "[" is VK_OEM_4 (0xDB)
That character/key can be 0xDD on other keyboards for example, also you must to take into account the shift states which Plus! doesn't all support either, so:
quote:
Originally posted by deAd
It's then compared to the pressed key code so it should work on all systems that have "[" as one of the keys...
It wont unfortunatly, because it is an OEM key.
Ps: And on Belgium keyboard pressing "[" will not even trigger a ChatWndEditKeyDown as it involves pressing AltGr (=right ALT) which is not detected by Plus! either.
Not to mention that the API VkKeyScan is something left over from Win95 and since then much things have changed (while the API has not). It wont work ligatures, dead keys, SGCAPS, or anything on the numeric keypad. And the biggest problem is it does not distinguish between the left and the right SHIFT/CTRL/ALT keys, which would be needed to specifically define the proper key. The API VkKeyScan is virtually (get it? 'virtually'
) useless and shouldn't be used....