From 2c9a19bafba852a884a54718d8e7f57d91a7de32 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 29 Apr 2009 10:45:16 +0200 Subject: [PATCH] key: stop using XKeysymToString() It does not return the same thing. Signed-off-by: Julien Danjou --- key.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/key.c b/key.c index ace5ab12..e5dd2e23 100644 --- a/key.c +++ b/key.c @@ -1,7 +1,7 @@ /* * key.c - Key bindings configuration management * - * Copyright © 2008 Julien Danjou + * Copyright © 2008-2009 Julien Danjou * Copyright © 2008 Pierre Habouzit * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ * */ -/* XStringToKeysym() and XKeysymToString()*/ +/* XStringToKeysym() */ #include /* XCB doesn't provide keysyms definition */ @@ -951,7 +951,13 @@ luaA_key_index(lua_State *L) lua_pushlstring(L, buf, slen); } else - lua_pushstring(L, XKeysymToString(k->keysym)); + { + char buf[MAX(MB_LEN_MAX, 32)]; + if(!key_press_lookup_string(k->keysym, buf, countof(buf))) + return 0; + + lua_pushstring(L, buf); + } break; case A_TK_MODIFIERS: luaA_pushmodifiers(L, k->mod);