aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-04-18Initial implementation of shortcut to windowsRichard Tamin1-7/+46
[PURPOSE] In editors such as vi and emacs, a user can mark a line in a file with a shortcut key and afterwards jump back to that line using the shortcut. The idea is extended to opened windows. A user can assign a keyboard shortcut to an opened window. Afterwards, the shortcut can be used to switch focus back to the marked window. Such shortcuts save the user from pressing "alt+tab" multiple times to cycle through windows until the desired one is found. [EXAMPLE USAGE] The following binding is added to file "~/.fluxbox/keys": Mod1 m ARG :MarkWindow Mod1 g ARG :GotoMarkedWindow User enters "alt+m x" to mark the currently focused window with shortcut key 'x' User enters "alt+g x" to switch focus to the marked window [IMPLEMENTATION SUMMARY] - Two new commands were added :MarkWindow and :GotoMarkedWindow - Keys.cc was modified: - addBinding() method supports parsing an argument placeholder where the user can pass in a shortcut key - doAction() method forwards the shortcut key to the command to execute - Class Keys::t_key was modified to recognize a placeholder key - New class ShortcutManager was added to maintain mapping of shortcut keys to marked windows
2016-09-21implement ON_SLIT actionsThomas Lübking1-2/+6
On the run, make it raise on left-clicks (like the toolbar) The enum already existed ;-) REQUEST: 113
2016-09-21support OnWinButton, OnMinButton & OnMaxButtonThomas Lübking1-0/+6
... actions in keys. This allows to override the default behavior as well as adding actions for the mouse wheel. Special casing of the two "geometry" related buttons (eg. to perform smart maximization, reverse the partial maximzation, add shading to the min button or whatnot) All other buttons have a rather dedicated meaning and are only really interesting for adding mouse wheels or eg. the window menu on rmb clicks. Needs docu.
2016-08-31introduce a 5s timeout for emacs shortcutsThomas Lübking1-6/+17
The user needs to enter his chain within 5 seconds Otherwise the chain is reset. REQUEST: 291
2016-08-30Don't replay presses which are required f/ motionsThomas Lübking1-0/+4
When trying to doAction(ButtonPress, ...), we check whether the action would hit for type==MotionNotify. In this case we do nothing but return "true" to tell the caller that this event is "for us". Otherwise the event would be replayed to the client and there'd go out MotionNotify grabs. tl;du: This fixes MoveX actions.
2015-01-21Fix behavior for autorepeat keysMathias Gumz1-0/+6
This reverts 58e09b719077605efadac9b712acb8f5e752f732 after having regressions and bug reports in regards to autorepeated key events are not working anymore. So, the problem with the lost keypress after the workspace change is still open but at least the behavior for other folks is as it was. Since 58e09b7190 seems to be corelated to "auto repeat" keys it might indicate the problem which 58e09b7190 "fixed". We will see. Fixes #1115.
2015-01-21Minor cosmeticsMathias Gumz1-2/+2
2015-01-03Remove various unused variablesMathias Gumz1-1/+0
Clang and Gcc-4.9 complaint about some unused variables here and there. And who are we to not make a compiler happy :)
2014-04-11merge Sami Kerola's new build-systemMathias Gumz1-5/+0
2013-08-02Fix lost keypresses after workspace change (#1067)Ed Martin1-5/+0
Do not Ungrab the keyboard for a KeyPress event, this causes us to lose the KeyRelease event which is needed to ungrab the keyboard after the event happened.
2013-05-26build-sys: include config.h to all files using automakeSami Kerola1-5/+0
Do not try to be too smart which compilations need config.h, as most of them will simply because of the config.h has information about system capabilities.
2013-02-13Fix missing LogicCommandsMathias Gumz1-0/+6
By removing FbTk/LogicCommands.o from LDADD in src/Makefile.am (commit 06655f6) I prevented the linker to pick up FbTk/LogicCommands.o and thus rendered all logic-commands useless. Using a small helper object to pull in the dependency fixes this problem without relying on manually tweaking the build system.
2012-11-07Adds the OnTab keyword for the keys fileJulien Viard de Galbert1-0/+2
Adding the following lines to the keys file restore the old behaviour to use Mouse2 on tabs to start tabbing, and keep OnTitlebar Mouse2 to lower the window. OnTab Mouse2 :StartTabbing OnTab Move1 :StartMoving Note: Internal tabs are triggering both OnTab and OnTitlebar events.
2012-01-04Pre-increment non-primitive types.Ryan Pavlik1-1/+1
Found with cppcheck: "Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code."
2011-09-14Use RefCount to store keybindingsPavel Labath1-53/+32
I'm doing this because I want to have access to keybindings from lua and for that I need more flexible ownership semantics.
2011-09-14Remove the assignment operator from a regular pointer to a RefCountPavel Labath1-1/+1
it is too easy too shoot yourself in the foot with it, other smart pointers also don't allow such assignments. If you do want to assign to a RefCount pointer, use reset(). ps: assignment between two RefCounts remains possible, of course.
2011-08-26regrab ButtonMotionMask as well (needed for 'Move' events in keysfile)Mathias Gumz1-1/+1
2011-08-26bugfix: remap keysyms to keycodes after 'MappingNotify', fix #3386257Mathias Gumz1-11/+25
setxkbmap and xmodmap both might change the keycodes. thus fluxbox needs to remap the keysyms from the currently loaded keytree to new keycodes after it received a 'MappingNotify' event. we do not reload() the keys file because: * the user might work on it right now * remap only needed symbols is cheaper than parsing the keysfile anyway
2011-05-10Make RefCount<> more sensiblePavel Labath1-3/+3
the previous version of operator*() made no sense. E.g., it violated the invariant (*ptr).foo <=> ptr->foo. The dereferencing operator now returns a reference to the pointed-to object, rather than a pointer to it. I also added a bool conversion operator, which can be used in testing the NULL-ness of the pointer. Anyone wondering if that could be done in a simpler way is encouraged to read <http://www.artima.com/cppsource/safebool.html>. And, finally, I removed the mutable flag from the m_data member, since it does not need it.
2010-09-11added '(workspace=[current])' to our default keysMathias Gumz1-2/+2
commit 882a50fe1d4930b156965c54d9b66ecb27b4c9b2 removed the hardcoded limit to cycle to windows on other workspaces, though it was and IS a good default behaviour. if users do not want this (they want to cycle to windows on other workspaces), they should explicitly avoid '(workspace=[current])' in their keysfile.
2010-09-04fixed the default 'OnTitlebar Mouse1' actionsMathias Gumz1-2/+2
2010-08-20implemented 'ActivateTab' action to (re)allow activation of tabs via mouseMathias Gumz1-0/+2
2010-08-16fixed typoMathias Gumz1-1/+1
2010-05-23mostly cosmetic fixes, mainly discovered by 'clang --analyze'Mathias Gumz1-1/+1
reordering of Resource-related stuff was because of "error: explicit specialization of 'getString' after instantiation" complaints.
2010-05-08prevent crash if m_keylist is 0Mathias Gumz1-0/+3
again, i do not know yet, why this could happen.
2010-05-08cleanup: missing initializationMathias Gumz1-0/+2
i ran across problems on a freshly installed ubuntu without any config files, m_keylist was not initialized, yet unsure why.
2010-05-05cosmeticMathias Gumz1-1/+1
2010-05-05added OnLeftGrip, OnRightGrip, OnWindowBorder modifiers for keys fileMathias Gumz1-0/+10
this allows to move some hardcoded keysbindings into the keys file and makes the code simpler
2010-03-17Changed #ifdef DEBUG ... cerr << to using fbdbg.Henrik Kinnunen1-3/+3
This will reduce the number of #ifdef DEBUG for simple debug messages. include "Debug.hh" and use fbdbg instead of cerr for debug.
2009-12-18implemented 'MoveN' and 'ClickN' support in keys file.Mathias Gumz1-43/+67
the hardcoded 'OnTitlebar Mouse1 :Raise' (see Window.cc, FluxboxWindow::buttonPressEvent()) is disabled for now, should be added to fluxbox-update_configs
2009-10-02just use the FbTk APIMathias Gumz1-0/+5
2009-08-08more fixes for fluxconf mangling the keys fileMark Tiefenbruck1-0/+7
2009-06-28add window menu and alt-tab to error case for keys fileMark Tiefenbruck1-0/+3
2009-03-04src/Keys.cc(deleteTree): use FbTk::STLUtil::destroyAndClearSecond() instead ↵Slava Semushin1-3/+5
of self-written code. No functional change. Signed-off-by: Slava Semushin <php-coder@altlinux.ru>
2008-11-02don't reload keys file on modifier map events, just re-grab keysMark Tiefenbruck1-0/+4
2008-10-04break keychains after an invalid key is pressed (which unfortunately will be ↵Mark Tiefenbruck1-9/+6
swallowed)
2008-09-28don't let KeyRelease events propagate to windowsMark Tiefenbruck1-6/+5
2008-08-22another parsing fixMark Tiefenbruck1-3/+3
2008-08-16revert focus when closing dialogsMark Tiefenbruck1-3/+3
2008-08-16move interpretation of normal hints to size hint classMark Tiefenbruck1-1/+1
2008-08-14cleanup of some filesMathias Gumz1-6/+7
2008-05-12only reload the keys file if the contents have changedMark Tiefenbruck1-25/+12
2008-04-30workaround for keys files broken by fluxconfMark Tiefenbruck1-0/+2
2008-02-11more fun with the window menuMark Tiefenbruck1-1/+7
2008-02-04Fix a freed memory access in Keys::doAction.Tomas Janousek1-2/+2
The thing next_key pointed to was getting freed in deleteTree. Signed-off-by: Tomas Janousek <tomi@nomi.cz>
2008-02-03check pointer, even though it shouldn't be necessaryMark Tiefenbruck1-1/+1
2008-01-11make FbTk::Command a template class, split parsing information out of ↵Mark Tiefenbruck1-3/+3
ObjectRegistry
2008-01-04remove old svn $Id$ tagsMark Tiefenbruck1-3/+0
2008-01-02decoupling, moved private datastructures to Keys.ccMathias Gumz1-32/+79
2007-12-30removed some unneeded headersMathias Gumz1-1/+0