Key command setting windows shows option key incorrectly

for example, option-j shows as "option #2206

Ok, I’d been meaning to sort this out, and I’ve checked in some fixes for it now - let me know if it’s still got any glitches for you…

KeyPress::getTextDescription() needs the following:

else if (keyCode == numberPadAdd) desc << numberPadPrefix << "+"; else if (keyCode == numberPadSubtract) desc << numberPadPrefix << "-"; else if (keyCode == numberPadMultiply) desc << numberPadPrefix << "*"; else if (keyCode == numberPadDivide) desc << numberPadPrefix << "/"; else if (keyCode == numberPadSeparator) desc << numberPadPrefix << " separator"; else if (keyCode == numberPadDecimalPoint) desc << numberPadPrefix << ".";

ah yes, thanks.

it’s still not quite right, numpad clear and numpad = generate a keycode of 0.

here is the updated translation table. this thing is a pain to edit.

static const int keyTranslations[] = { 0, 's', 'd', 'f', 'h', 'g', 'z', 'x', 'c', 'v', 0xa7, 'b', 'q', 'w', 'e', 'r', 'y', 't', '1', '2', '3', '4', '6', '5', '=', '9', '7', '-', '8', '0', ']', 'o', 'u', '[', 'i', 'p', KeyPress::returnKey, 'l', 'j', '\'', 'k', ';', '\\', ',', '/', 'n', 'm', '.', 0, 0, '`', KeyPress::backspaceKey, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KeyPress::numberPadDecimalPoint, 0, KeyPress::numberPadMultiply, 0, KeyPress::numberPadAdd, 0, KeyPress::numberPadClear, 0, 0, 0, KeyPress::numberPadDivide, KeyPress::returnKey, 0, KeyPress::numberPadSubtract, 0, 0, KeyPress::numberPadEquals, KeyPress::numberPad0, KeyPress::numberPad1, KeyPress::numberPad2, KeyPress::numberPad3, KeyPress::numberPad4, KeyPress::numberPad5, KeyPress::numberPad6, KeyPress::numberPad7, 0, KeyPress::numberPad8, KeyPress::numberPad9, 0, 0, 0, KeyPress::F5Key, KeyPress::F6Key, KeyPress::F7Key, KeyPress::F3Key, KeyPress::F8Key, KeyPress::F9Key, 0, KeyPress::F11Key, 0, KeyPress::F13Key, KeyPress::F16Key, KeyPress::F14Key, 0, KeyPress::F10Key, 0, KeyPress::F12Key, 0, KeyPress::F15Key, 0, KeyPress::homeKey, KeyPress::pageUpKey, 0, KeyPress::F4Key, KeyPress::endKey, KeyPress::F2Key, KeyPress::pageDownKey, KeyPress::F1Key, KeyPress::leftKey, KeyPress::rightKey, KeyPress::downKey, KeyPress::upKey, 0 };

need this too:

[code] if (key == 0)
{
// see if it’s a numpad number
for (int i = 0; i < 10; ++i)
if (desc.containsWholeWordIgnoreCase (numberPadPrefix + String (i)))
key = numberPad0 + i;

	// see if it is another numpad key
	if (desc.containsWholeWordIgnoreCase(String(numberPadPrefix).trim()))
	{
		if (desc.endsWith(T("+")))
			return numberPadAdd;
		else if (desc.endsWith(T("-")))
			return numberPadSubtract;
		else if (desc.endsWith(T("*")))
			return numberPadMultiply;
		else if (desc.endsWith(T("/")))
			return numberPadDivide;
		else if (desc.endsWith(T("seperator")))
			return numberPadSeparator;
		else if (desc.endsWith(T(".")))
			return numberPadDecimalPoint;
		else if (desc.endsWith(T("=")))
			return numberPadEquals;
		else if (desc.endsWith(T("clear")))
			return numberPadClear;
	}[/code]

Cheers. (I don’t think I have a clear key on my laptop’s number pad though…)

Another update, KeyPress::spaceKey was missing.

static const int keyTranslations[] = { 0, 's', 'd', 'f', 'h', 'g', 'z', 'x', 'c', 'v', 0xa7, 'b', 'q', 'w', 'e', 'r', 'y', 't', '1', '2', '3', '4', '6', '5', - '=', '9', '7', '-', '8', '0', ']', 'o', 'u', '[', 'i', 'p', KeyPress::returnKey, 'l', 'j', '\'', 'k', ';', '\\', ',', '/', 'n', 'm', '.', 0, KeyPress::spaceKey, '`', KeyPress::backspaceKey, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KeyPress::numberPadDecimalPoint, 0, KeyPress::numberPadMultiply, 0, KeyPress::numberPadAdd, 0, KeyPress::numberPadClear, 0, 0, 0, KeyPress::numberPadDivide, KeyPress::returnKey, 0, KeyPress::numberPadSubtract, 0, 0, KeyPress::numberPadEquals, KeyPress::numberPad0, KeyPress::numberPad1, KeyPress::numberPad2, KeyPress::numberPad3, KeyPress::numberPad4, KeyPress::numberPad5, KeyPress::numberPad6, KeyPress::numberPad7, 0, KeyPress::numberPad8, KeyPress::numberPad9, 0, 0, 0, KeyPress::F5Key, KeyPress::F6Key, KeyPress::F7Key, KeyPress::F3Key, KeyPress::F8Key, KeyPress::F9Key, 0, KeyPress::F11Key, 0, KeyPress::F13Key, KeyPress::F16Key, KeyPress::F14Key, 0, KeyPress::F10Key, 0, KeyPress::F12Key, 0, KeyPress::F15Key, 0, KeyPress::homeKey, KeyPress::pageUpKey, 0, KeyPress::F4Key, KeyPress::endKey, KeyPress::F2Key, KeyPress::pageDownKey, KeyPress::F1Key, KeyPress::leftKey, KeyPress::rightKey, KeyPress::downKey, KeyPress::upKey, 0 };

Blimey, that was a bit of an oversight! Thanks!