Allow pretty much any key for gestures, like Emerald
This commit is contained in:
@@ -567,20 +567,23 @@ void LLPreviewGesture::addModifiers()
|
|||||||
combo->setCurrentByIndex(0);
|
combo->setCurrentByIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const std::string valid_key_to_string(KEY key)
|
||||||
|
{
|
||||||
|
std::string skey(1,(char)key);
|
||||||
|
std::string strkey = LLKeyboard::stringFromKey(key);
|
||||||
|
return ((skey == strkey && key >= ' ' && key <= '~') || (skey != strkey) ) ? strkey : "";
|
||||||
|
}
|
||||||
|
|
||||||
void LLPreviewGesture::addKeys()
|
void LLPreviewGesture::addKeys()
|
||||||
{
|
{
|
||||||
LLComboBox* combo = mKeyCombo;
|
LLComboBox* combo = mKeyCombo;
|
||||||
|
|
||||||
combo->add( NONE_LABEL );
|
combo->add( NONE_LABEL );
|
||||||
|
for (KEY key = ' '; key < KEY_NONE; key++)
|
||||||
// <edit>
|
{
|
||||||
//define for the lulz
|
std::string keystr = valid_key_to_string(key);
|
||||||
#define addKey(k) combo->add( LLKeyboard::stringFromKey(k), ADD_BOTTOM );
|
if(keystr != "")combo->add( keystr, ADD_BOTTOM );
|
||||||
for (KEY key = KEY_F2; key <= KEY_F12; key++)
|
}
|
||||||
addKey(key)
|
|
||||||
for (KEY key = ' '; key <= '~'; key++)
|
|
||||||
addKey(key)
|
|
||||||
// </edit>
|
|
||||||
combo->setCurrentByIndex(0);
|
combo->setCurrentByIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user