2002-06-12 03:16:41 +00:00
|
|
|
|
/**
|
2007-04-27 08:05:58 +00:00
|
|
|
|
* \file KeyMap.cpp
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-11-30 13:25:38 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author Jean-Marc Lasgouttes
|
|
|
|
|
* \author John Levon
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-06-12 03:16:41 +00:00
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
|
|
#include <config.h>
|
2000-02-04 09:38:32 +00:00
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
#include "KeyMap.h"
|
2003-09-06 20:08:10 +00:00
|
|
|
|
|
|
|
|
|
#include "debug.h"
|
2007-04-27 08:19:12 +00:00
|
|
|
|
#include "KeySequence.h"
|
2003-07-26 23:04:39 +00:00
|
|
|
|
#include "LyXAction.h"
|
2007-04-26 11:30:54 +00:00
|
|
|
|
#include "Lexer.h"
|
2003-09-06 20:08:10 +00:00
|
|
|
|
|
2007-04-27 08:43:38 +00:00
|
|
|
|
#include "frontends/KeySymbol.h"
|
2003-09-06 20:08:10 +00:00
|
|
|
|
|
|
|
|
|
#include "support/filetools.h"
|
2004-07-24 10:55:30 +00:00
|
|
|
|
|
|
|
|
|
#include <sstream>
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2006-11-26 21:30:39 +00:00
|
|
|
|
using support::FileName;
|
2006-10-21 00:16:43 +00:00
|
|
|
|
using support::i18nLibFileSearch;
|
2000-03-28 02:18:55 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
using std::endl;
|
|
|
|
|
using std::string;
|
|
|
|
|
|
2003-09-21 23:00:47 +00:00
|
|
|
|
|
2007-04-27 08:43:38 +00:00
|
|
|
|
string const KeyMap::printKeySym(KeySymbol const & key,
|
2002-06-18 15:44:30 +00:00
|
|
|
|
key_modifier::state mod)
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2001-11-30 13:25:38 +00:00
|
|
|
|
string buf;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2004-03-26 15:12:35 +00:00
|
|
|
|
string const s = key.getSymbolName();
|
2002-03-21 17:27:08 +00:00
|
|
|
|
|
2003-06-18 13:47:11 +00:00
|
|
|
|
if (mod & key_modifier::shift)
|
|
|
|
|
buf += "S-";
|
|
|
|
|
if (mod & key_modifier::ctrl)
|
|
|
|
|
buf += "C-";
|
|
|
|
|
if (mod & key_modifier::alt)
|
|
|
|
|
buf += "M-";
|
|
|
|
|
|
2002-06-18 15:44:30 +00:00
|
|
|
|
buf += s;
|
2001-11-30 13:25:38 +00:00
|
|
|
|
return buf;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-06-18 13:47:11 +00:00
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
size_t KeyMap::bind(string const & seq, FuncRequest const & func)
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2007-04-01 14:51:13 +00:00
|
|
|
|
LYXERR(Debug::KBMAP) << "BIND: Sequence `"
|
|
|
|
|
<< seq << "' Action `"
|
|
|
|
|
<< func.action << '\'' << endl;
|
2002-03-21 17:27:08 +00:00
|
|
|
|
|
2007-04-27 08:19:12 +00:00
|
|
|
|
KeySequence k(0, 0);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2001-10-01 15:31:59 +00:00
|
|
|
|
string::size_type const res = k.parse(seq);
|
2001-11-14 11:31:14 +00:00
|
|
|
|
if (res == string::npos) {
|
2003-09-21 23:00:47 +00:00
|
|
|
|
defkey(&k, func);
|
2001-11-30 13:25:38 +00:00
|
|
|
|
} else {
|
2007-04-01 10:09:49 +00:00
|
|
|
|
LYXERR(Debug::KBMAP) << "Parse error at position " << res
|
1999-10-07 18:44:17 +00:00
|
|
|
|
<< " in key sequence '" << seq << "'."
|
|
|
|
|
<< endl;
|
2001-11-30 13:25:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-07-26 23:04:39 +00:00
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
enum BindTags {
|
|
|
|
|
BN_BIND,
|
|
|
|
|
BN_BINDFILE
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
keyword_item bindTags[] = {
|
|
|
|
|
{ "\\bind", BN_BIND },
|
|
|
|
|
{ "\\bind_file", BN_BINDFILE }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
bool KeyMap::read(string const & bind_file)
|
2003-07-26 23:04:39 +00:00
|
|
|
|
{
|
|
|
|
|
const int bindCount = sizeof(bindTags) / sizeof(keyword_item);
|
|
|
|
|
|
2007-04-26 11:30:54 +00:00
|
|
|
|
Lexer lexrc(bindTags, bindCount);
|
2003-07-26 23:04:39 +00:00
|
|
|
|
if (lyxerr.debugging(Debug::PARSER))
|
|
|
|
|
lexrc.printTable(lyxerr);
|
|
|
|
|
|
2006-11-26 21:30:39 +00:00
|
|
|
|
FileName const tmp(i18nLibFileSearch("bind", bind_file, "bind"));
|
2003-07-26 23:04:39 +00:00
|
|
|
|
lexrc.setFile(tmp);
|
2003-07-29 09:43:15 +00:00
|
|
|
|
if (!lexrc.isOK()) {
|
2007-04-27 08:05:58 +00:00
|
|
|
|
lyxerr << "KeyMap::read: cannot open bind file:"
|
2003-07-29 09:43:15 +00:00
|
|
|
|
<< tmp << endl;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2003-07-26 23:04:39 +00:00
|
|
|
|
|
2007-04-01 10:09:49 +00:00
|
|
|
|
LYXERR(Debug::KBMAP) << "Reading bind file:" << tmp << endl;
|
2003-07-26 23:04:39 +00:00
|
|
|
|
|
|
|
|
|
bool error = false;
|
2004-04-29 15:25:56 +00:00
|
|
|
|
while (lexrc.isOK()) {
|
2003-07-26 23:04:39 +00:00
|
|
|
|
switch (lexrc.lex()) {
|
2007-04-26 11:30:54 +00:00
|
|
|
|
case Lexer::LEX_UNDEF:
|
2003-07-26 23:04:39 +00:00
|
|
|
|
lexrc.printError("Unknown tag `$$Token'");
|
2003-07-29 09:43:15 +00:00
|
|
|
|
error = true;
|
2003-07-26 23:04:39 +00:00
|
|
|
|
continue;
|
2007-04-26 11:30:54 +00:00
|
|
|
|
case Lexer::LEX_FEOF:
|
2003-07-26 23:04:39 +00:00
|
|
|
|
continue;
|
|
|
|
|
case BN_BIND:
|
|
|
|
|
{
|
|
|
|
|
string seq, cmd;
|
2003-09-09 18:27:24 +00:00
|
|
|
|
|
2003-07-26 23:04:39 +00:00
|
|
|
|
if (lexrc.next()) {
|
|
|
|
|
seq = lexrc.getString();
|
|
|
|
|
} else {
|
|
|
|
|
lexrc.printError("BN_BIND: Missing key sequence");
|
2003-07-29 09:43:15 +00:00
|
|
|
|
error = true;
|
2003-07-26 23:04:39 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2003-09-09 18:27:24 +00:00
|
|
|
|
|
2003-07-26 23:04:39 +00:00
|
|
|
|
if (lexrc.next(true)) {
|
|
|
|
|
cmd = lexrc.getString();
|
|
|
|
|
} else {
|
|
|
|
|
lexrc.printError("BN_BIND: missing command");
|
2003-07-29 09:43:15 +00:00
|
|
|
|
error = true;
|
2003-07-26 23:04:39 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2003-09-09 18:27:24 +00:00
|
|
|
|
|
2003-09-21 23:00:47 +00:00
|
|
|
|
FuncRequest func = lyxaction.lookupFunc(cmd);
|
|
|
|
|
if (func. action == LFUN_UNKNOWN_ACTION) {
|
2003-07-26 23:04:39 +00:00
|
|
|
|
lexrc.printError("BN_BIND: Unknown LyX"
|
|
|
|
|
" function `$$Token'");
|
2003-07-29 09:43:15 +00:00
|
|
|
|
error = true;
|
2003-07-26 23:04:39 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
2003-09-09 18:27:24 +00:00
|
|
|
|
|
2003-09-21 23:00:47 +00:00
|
|
|
|
bind(seq, func);
|
2003-07-26 23:04:39 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case BN_BINDFILE:
|
|
|
|
|
if (lexrc.next()) {
|
|
|
|
|
string const tmp(lexrc.getString());
|
2004-04-29 15:25:56 +00:00
|
|
|
|
error |= !read(tmp);
|
2003-07-26 23:04:39 +00:00
|
|
|
|
} else {
|
|
|
|
|
lexrc.printError("BN_BINDFILE: Missing file name");
|
|
|
|
|
error = true;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-07-29 09:43:15 +00:00
|
|
|
|
if (error)
|
2007-04-27 08:05:58 +00:00
|
|
|
|
lyxerr << "KeyMap::read: error while reading bind file:"
|
2003-07-29 09:43:15 +00:00
|
|
|
|
<< tmp << endl;
|
|
|
|
|
return !error;
|
2003-07-26 23:04:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2003-09-21 23:00:47 +00:00
|
|
|
|
FuncRequest const &
|
2007-04-27 08:43:38 +00:00
|
|
|
|
KeyMap::lookup(KeySymbolPtr key,
|
2007-04-27 08:19:12 +00:00
|
|
|
|
key_modifier::state mod, KeySequence * seq) const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2003-09-21 23:00:47 +00:00
|
|
|
|
static FuncRequest const unknown(LFUN_UNKNOWN_ACTION);
|
|
|
|
|
|
2000-02-04 09:38:32 +00:00
|
|
|
|
if (table.empty()) {
|
1999-09-27 18:44:28 +00:00
|
|
|
|
seq->curmap = seq->stdmap;
|
2001-11-30 13:25:38 +00:00
|
|
|
|
seq->mark_deleted();
|
2003-09-21 23:00:47 +00:00
|
|
|
|
return unknown;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-06-18 13:47:11 +00:00
|
|
|
|
Table::const_iterator end = table.end();
|
|
|
|
|
for (Table::const_iterator cit = table.begin(); cit != end; ++cit) {
|
2002-05-26 17:33:14 +00:00
|
|
|
|
key_modifier::state mask(cit->mod.second);
|
|
|
|
|
key_modifier::state check =
|
|
|
|
|
static_cast<key_modifier::state>(mod & ~mask);
|
2002-11-27 10:30:28 +00:00
|
|
|
|
|
2002-08-06 00:54:20 +00:00
|
|
|
|
if (*(cit->code) == *key && cit->mod.first == check) {
|
2001-11-30 13:25:38 +00:00
|
|
|
|
// match found
|
2001-07-12 11:11:10 +00:00
|
|
|
|
if (cit->table.get()) {
|
1999-12-16 06:43:25 +00:00
|
|
|
|
// this is a prefix key - set new map
|
2001-07-12 11:11:10 +00:00
|
|
|
|
seq->curmap = cit->table.get();
|
2006-05-05 20:23:12 +00:00
|
|
|
|
static FuncRequest prefix(LFUN_COMMAND_PREFIX);
|
2003-09-21 23:00:47 +00:00
|
|
|
|
return prefix;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
} else {
|
1999-12-16 06:43:25 +00:00
|
|
|
|
// final key - reset map
|
1999-09-27 18:44:28 +00:00
|
|
|
|
seq->curmap = seq->stdmap;
|
2001-11-30 13:25:38 +00:00
|
|
|
|
seq->mark_deleted();
|
2003-09-21 23:00:47 +00:00
|
|
|
|
return cit->func;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2000-02-04 09:38:32 +00:00
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
// error - key not found:
|
|
|
|
|
seq->curmap = seq->stdmap;
|
2001-11-30 13:25:38 +00:00
|
|
|
|
seq->mark_deleted();
|
2003-09-21 23:00:47 +00:00
|
|
|
|
|
|
|
|
|
return unknown;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
docstring const KeyMap::print(bool forgui) const
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2006-12-13 14:13:01 +00:00
|
|
|
|
docstring buf;
|
2003-06-18 13:47:11 +00:00
|
|
|
|
Table::const_iterator end = table.end();
|
|
|
|
|
for (Table::const_iterator cit = table.begin(); cit != end; ++cit) {
|
2007-01-04 17:10:24 +00:00
|
|
|
|
buf += cit->code->print(cit->mod.first, forgui);
|
2000-02-04 09:38:32 +00:00
|
|
|
|
buf += ' ';
|
|
|
|
|
}
|
2001-11-30 13:25:38 +00:00
|
|
|
|
return buf;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:19:12 +00:00
|
|
|
|
void KeyMap::defkey(KeySequence * seq, FuncRequest const & func, unsigned int r)
|
1999-09-27 18:44:28 +00:00
|
|
|
|
{
|
2007-04-27 08:43:38 +00:00
|
|
|
|
KeySymbolPtr code = seq->sequence[r];
|
2002-08-06 00:54:20 +00:00
|
|
|
|
if (!code->isOK())
|
|
|
|
|
return;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2002-05-26 17:33:14 +00:00
|
|
|
|
key_modifier::state const mod1 = seq->modifiers[r].first;
|
|
|
|
|
key_modifier::state const mod2 = seq->modifiers[r].second;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2001-11-30 13:25:38 +00:00
|
|
|
|
// check if key is already there
|
2003-06-18 13:47:11 +00:00
|
|
|
|
Table::iterator end = table.end();
|
|
|
|
|
for (Table::iterator it = table.begin(); it != end; ++it) {
|
2002-06-18 15:44:30 +00:00
|
|
|
|
if (*(code) == *(it->code)
|
|
|
|
|
&& mod1 == it->mod.first
|
|
|
|
|
&& mod2 == it->mod.second) {
|
2000-02-04 09:38:32 +00:00
|
|
|
|
// overwrite binding
|
2001-11-30 13:25:38 +00:00
|
|
|
|
if (r + 1 == seq->length()) {
|
2007-04-01 10:09:49 +00:00
|
|
|
|
LYXERR(Debug::KBMAP)
|
1999-10-07 18:44:17 +00:00
|
|
|
|
<< "Warning: New binding for '"
|
2007-01-04 17:10:24 +00:00
|
|
|
|
<< to_utf8(seq->print(false))
|
1999-10-07 18:44:17 +00:00
|
|
|
|
<< "' is overriding old binding..."
|
|
|
|
|
<< endl;
|
2002-05-21 23:50:36 +00:00
|
|
|
|
if (it->table.get()) {
|
|
|
|
|
it->table.reset();
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
2003-09-21 23:00:47 +00:00
|
|
|
|
it->func = func;
|
2004-11-08 10:54:29 +00:00
|
|
|
|
it->func.origin = FuncRequest::KEYBOARD;
|
2001-11-30 13:25:38 +00:00
|
|
|
|
return;
|
2001-07-12 11:11:10 +00:00
|
|
|
|
} else if (!it->table.get()) {
|
2006-12-13 14:13:01 +00:00
|
|
|
|
lyxerr << "Error: New binding for '"
|
2007-01-04 17:10:24 +00:00
|
|
|
|
<< to_utf8(seq->print(false))
|
1999-10-07 18:44:17 +00:00
|
|
|
|
<< "' is overriding old binding..."
|
2001-11-30 13:25:38 +00:00
|
|
|
|
<< endl;
|
|
|
|
|
return;
|
2000-02-04 09:38:32 +00:00
|
|
|
|
} else {
|
2003-09-21 23:00:47 +00:00
|
|
|
|
it->table->defkey(seq, func, r + 1);
|
2001-11-30 13:25:38 +00:00
|
|
|
|
return;
|
2000-02-04 09:38:32 +00:00
|
|
|
|
}
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2002-03-21 17:27:08 +00:00
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
Table::iterator newone = table.insert(table.end(), Key());
|
2001-07-12 11:11:10 +00:00
|
|
|
|
newone->code = code;
|
2002-05-26 17:33:14 +00:00
|
|
|
|
newone->mod = seq->modifiers[r];
|
2001-11-30 13:25:38 +00:00
|
|
|
|
if (r + 1 == seq->length()) {
|
2003-09-21 23:00:47 +00:00
|
|
|
|
newone->func = func;
|
2006-01-18 17:44:01 +00:00
|
|
|
|
newone->func.origin = FuncRequest::KEYBOARD;
|
2002-05-21 23:50:36 +00:00
|
|
|
|
newone->table.reset();
|
1999-09-27 18:44:28 +00:00
|
|
|
|
} else {
|
2007-04-27 08:05:58 +00:00
|
|
|
|
newone->table.reset(new KeyMap);
|
2003-09-21 23:00:47 +00:00
|
|
|
|
newone->table->defkey(seq, func, r + 1);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
docstring const KeyMap::printbindings(FuncRequest const & func) const
|
1999-12-16 06:43:25 +00:00
|
|
|
|
{
|
2006-12-13 14:13:01 +00:00
|
|
|
|
odocstringstream res;
|
2004-07-02 10:03:22 +00:00
|
|
|
|
Bindings bindings = findbindings(func);
|
|
|
|
|
for (Bindings::const_iterator cit = bindings.begin();
|
|
|
|
|
cit != bindings.end() ; ++cit)
|
2007-01-04 17:10:24 +00:00
|
|
|
|
res << '[' << cit->print(true) << ']';
|
2004-07-02 10:03:22 +00:00
|
|
|
|
return res.str();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
KeyMap::Bindings KeyMap::findbindings(FuncRequest const & func) const
|
2004-07-02 10:03:22 +00:00
|
|
|
|
{
|
2007-04-27 08:19:12 +00:00
|
|
|
|
return findbindings(func, KeySequence(0, 0));
|
2004-07-02 10:03:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:05:58 +00:00
|
|
|
|
KeyMap::Bindings KeyMap::findbindings(FuncRequest const & func,
|
2007-04-27 08:19:12 +00:00
|
|
|
|
KeySequence const & prefix) const
|
2004-07-02 10:03:22 +00:00
|
|
|
|
{
|
|
|
|
|
Bindings res;
|
2000-02-04 09:38:32 +00:00
|
|
|
|
if (table.empty()) return res;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
2000-08-03 21:17:52 +00:00
|
|
|
|
Table::const_iterator end = table.end();
|
2000-10-11 21:06:43 +00:00
|
|
|
|
for (Table::const_iterator cit = table.begin();
|
2000-08-03 21:17:52 +00:00
|
|
|
|
cit != end; ++cit) {
|
2001-07-12 11:11:10 +00:00
|
|
|
|
if (cit->table.get()) {
|
2007-04-27 08:19:12 +00:00
|
|
|
|
KeySequence seq = prefix;
|
2004-07-02 10:03:22 +00:00
|
|
|
|
seq.addkey(cit->code, cit->mod.first);
|
2004-07-24 10:55:30 +00:00
|
|
|
|
Bindings res2 =
|
2004-07-02 10:03:22 +00:00
|
|
|
|
cit->table->findbindings(func, seq);
|
|
|
|
|
res.insert(res.end(), res2.begin(), res2.end());
|
2003-09-21 23:00:47 +00:00
|
|
|
|
} else if (cit->func == func) {
|
2007-04-27 08:19:12 +00:00
|
|
|
|
KeySequence seq = prefix;
|
2004-07-02 10:03:22 +00:00
|
|
|
|
seq.addkey(cit->code, cit->mod.first);
|
|
|
|
|
res.push_back(seq);
|
1999-09-27 18:44:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2003-09-21 23:00:47 +00:00
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
|
return res;
|
|
|
|
|
}
|
2004-07-07 09:32:19 +00:00
|
|
|
|
|
|
|
|
|
|
2007-04-27 08:43:38 +00:00
|
|
|
|
std::pair<KeySymbol const *, key_modifier::state>
|
2007-04-27 08:05:58 +00:00
|
|
|
|
KeyMap::find1keybinding(FuncRequest const & func) const
|
2004-07-07 09:32:19 +00:00
|
|
|
|
{
|
|
|
|
|
Table::const_iterator end = table.end();
|
|
|
|
|
for (Table::const_iterator cit = table.begin();
|
|
|
|
|
cit != end; ++cit) {
|
2004-07-24 10:55:30 +00:00
|
|
|
|
if (!cit->table.get() && cit->func == func)
|
2004-07-07 09:32:19 +00:00
|
|
|
|
return std::make_pair(cit->code.get(), cit->mod.first);
|
|
|
|
|
}
|
|
|
|
|
|
2007-04-27 08:43:38 +00:00
|
|
|
|
return std::make_pair<KeySymbol const *, key_modifier::state>(0, key_modifier::none);
|
2004-07-24 10:55:30 +00:00
|
|
|
|
}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|