MCPcopy Index your code
hub / github.com/NetHack/NetHack / cmdbind_swapkeys

Function cmdbind_swapkeys

src/cmd.c:2194–2204  ·  view source on GitHub ↗

swap key bindings for key1 and key2. both bindings must exist. */

Source from the content-addressed store, hash-verified

2192
2193/* swap key bindings for key1 and key2. both bindings must exist. */
2194staticfn void
2195cmdbind_swapkeys(uchar key1, uchar key2)
2196{
2197 struct Cmd_bind *bind1 = cmdbind_get(key1);
2198 struct Cmd_bind *bind2 = cmdbind_get(key2);
2199
2200 if (bind1 && bind2) {
2201 bind1->key = key2;
2202 bind2->key = key1;
2203 }
2204}
2205
2206/* return number of extended commands bound to a non-default key */
2207int

Callers 1

reset_commandsFunction · 0.85

Calls 1

cmdbind_getFunction · 0.85

Tested by

no test coverage detected