improved macro tooltips, more debug log info

pull/14/head
sezanzeb 4 years ago
parent 3ce9804f96
commit 59bd7348e4

@ -681,7 +681,7 @@
<property name="tooltip-text" translatable="yes">Macro examples:
- k(a)
- r(3, k(a).w(500))
- h(a).k(b)
- h(k(a)).k(b)
- m(Control_L, k(a).k(x))
Help:
@ -689,7 +689,10 @@ Help:
- w: waits in milliseconds
- k: writes a single keystroke
- m: holds a modifier while executing the second parameter
- h: executes the parameter as long as the key is pressed down</property>
- h: executes the parameter as long as the key is pressed down
between each keystrokes macros will sleep for 10ms by default.
This can be configured in ~/.config/key-mapper/config</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="label" translatable="yes">Mapping</property>

@ -44,6 +44,8 @@ logging.Logger.spam = spam
start = time.time()
LOG_PATH = '~/.log/key-mapper'
class Formatter(logging.Formatter):
"""Overwritten Formatter to print nicer logs."""
@ -137,8 +139,14 @@ def update_verbosity(debug):
logger.setLevel(logging.INFO)
def add_filehandler(path='~/.log/key-mapper'):
def add_filehandler(path=LOG_PATH):
"""Clear the existing logfile and start logging to it."""
if is_debug():
logger.warning(
'Debug level will log all your keystrokes to "%s"',
LOG_PATH
)
log_path = os.path.expanduser(path)
log_file = os.path.join(log_path, 'log')

Loading…
Cancel
Save