2008-05-28 12:15:00 +02:00
|
|
|
/*
|
|
|
|
* keybinding.c - Key bindings configuration management
|
|
|
|
*
|
|
|
|
* Copyright © 2008 Julien Danjou <julien@danjou.info>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2008-12-18 11:33:19 +01:00
|
|
|
#include "key.h"
|
2008-05-28 12:15:00 +02:00
|
|
|
|
|
|
|
/** Define a global key binding. This key binding will always be available.
|
2008-12-18 11:33:19 +01:00
|
|
|
* (DEPRECATED, see key).
|
2008-06-10 20:12:51 +02:00
|
|
|
* \param L The Lua VM state.
|
|
|
|
* \luastack
|
|
|
|
* \lparam A table with modifier keys.
|
|
|
|
* \lparam A key name.
|
2008-12-16 12:00:51 +01:00
|
|
|
* \lparam A function to execute on key press.
|
|
|
|
* \lparam A function to execute on key release.
|
2008-12-18 11:33:19 +01:00
|
|
|
* \lreturn The key.
|
2008-05-28 12:15:00 +02:00
|
|
|
*/
|
|
|
|
static int
|
|
|
|
luaA_keybinding_new(lua_State *L)
|
|
|
|
{
|
2008-12-18 11:33:19 +01:00
|
|
|
luaA_deprecate(L, "key");
|
|
|
|
return luaA_key_new(L);
|
2008-05-28 12:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const struct luaL_reg awesome_keybinding_methods[] =
|
|
|
|
{
|
2008-06-30 14:01:55 +02:00
|
|
|
{ "__call", luaA_keybinding_new },
|
2008-05-28 12:15:00 +02:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|