MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetKeyBindName

Method GetKeyBindName

src/game/client/components/binds.cpp:449–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449void CBinds::GetKeyBindName(int Key, int ModifierMask, char *pBuf, size_t BufSize) const
450{
451 pBuf[0] = '\0';
452 for(int Modifier = KeyModifier::CTRL; Modifier < KeyModifier::COUNT; Modifier++)
453 {
454 if(ModifierMask & (1 << Modifier))
455 {
456 str_append(pBuf, GetModifierName(Modifier), BufSize);
457 str_append(pBuf, "+", BufSize);
458 }
459 }
460 str_append(pBuf, Input()->KeyName(Key), BufSize);
461}
462
463char *CBinds::GetKeyBindCommand(int ModifierCombination, int Key) const
464{

Callers 1

DoKeyReaderMethod · 0.80

Calls 3

InputFunction · 0.85
KeyNameMethod · 0.80
str_appendFunction · 0.50

Tested by

no test coverage detected