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