aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommands.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-12 15:51:37 (GMT)
committersimonb <simonb>2006-04-12 15:51:37 (GMT)
commit33079d2593a7a598446cc837fc39eb2a914ebb1f (patch)
tree40c8793a180835ee46dfdae0e336340df9788c69 /src/FbCommands.cc
parent48579408d19fe0042a32f9634e6518b2eca3671c (diff)
downloadfluxbox-33079d2593a7a598446cc837fc39eb2a914ebb1f.zip
fluxbox-33079d2593a7a598446cc837fc39eb2a914ebb1f.tar.bz2
add "key modes" - thanks to Mark Tiefenbruck, mark at tiefenbruck dot org
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r--src/FbCommands.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index eb4e040..fc2426d 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -225,6 +225,21 @@ void SetStyleCmd::execute() {
225 Fluxbox::instance()->getStyleOverlayFilename()); 225 Fluxbox::instance()->getStyleOverlayFilename());
226} 226}
227 227
228KeyModeCmd::KeyModeCmd(const std::string &arguments):m_keymode(arguments),m_end_args("None Escape") {
229 string::size_type second_pos = m_keymode.find_first_of(" \t", 0);
230 if (second_pos != string::npos) {
231 // ok we have arguments, parsing them here
232 m_end_args = m_keymode.substr(second_pos);
233 m_keymode.erase(second_pos); // remove argument from command
234 }
235 if (m_keymode != "default")
236 Fluxbox::instance()->keys()->addBinding(m_keymode + ": " + m_end_args + " :keymode default");
237}
238
239void KeyModeCmd::execute() {
240 Fluxbox::instance()->keys()->keyMode(m_keymode);
241}
242
228void ShowRootMenuCmd::execute() { 243void ShowRootMenuCmd::execute() {
229 BScreen *screen = Fluxbox::instance()->mouseScreen(); 244 BScreen *screen = Fluxbox::instance()->mouseScreen();
230 if (screen == 0) 245 if (screen == 0)