diff options
-rw-r--r-- | src/hookinc.h | 62 | ||||
-rw-r--r-- | src/perl/keysym-list | 37 |
2 files changed, 99 insertions, 0 deletions
diff --git a/src/hookinc.h b/src/hookinc.h new file mode 100644 index 0000000..ec368f3 --- /dev/null +++ b/src/hookinc.h @@ -0,0 +1,62 @@ +// all supported hooks + def (INIT) + def (DESTROY) + def (RESET) + def (START) + def (CHILD_START) + def (CHILD_EXIT) + + def (SEL_BEGIN) + def (SEL_EXTEND) + def (SEL_MAKE) + def (SEL_GRAB) + + def (SEL_CLICK) + + def (VIEW_CHANGE) + def (SCROLL_BACK) + def (LINE_UPDATE) + def (ADD_LINES) + def (OSC_SEQ) + def (OSC_SEQ_PERL) + def (TT_WRITE) + + def (REFRESH_BEGIN) + def (REFRESH_END) + + def (ACTION) + def (USER_COMMAND) + def (REGISTER_COMMAND) + + def (ROOT_EVENT) + def (X_EVENT) + def (FOCUS_IN) + def (FOCUS_OUT) + def (KEY_PRESS) + def (KEY_RELEASE) + def (BUTTON_PRESS) + def (BUTTON_RELEASE) + def (MOTION_NOTIFY) + def (MAP_NOTIFY) + def (UNMAP_NOTIFY) + def (CONFIGURE_NOTIFY) + def (CLIENT_MESSAGE) + def (WM_DELETE_WINDOW) + def (WM_PROTOCOLS) + def (PROPERTY_NOTIFY) + def (RESIZE_ALL_WINDOWS) + def (SIZE_CHANGE) + def (POSITION_CHANGE) + def (ROOTPMAP_CHANGE) + + def (XIM_PREEDIT_START) + def (XIM_PREEDIT_DONE) + def (XIM_PREEDIT_DRAW) + def (XIM_PREEDIT_CARET) + + def (CUSTOM_REND) // hovering over custom rendition, generate enter/leave maybe? + + def (BELL) + + def (TT_PASTE) + diff --git a/src/perl/keysym-list b/src/perl/keysym-list new file mode 100644 index 0000000..433fbc5 --- /dev/null +++ b/src/perl/keysym-list @@ -0,0 +1,37 @@ +#! perl + +=head1 NAME + +keysym-list - implement the "list" keysym expansion. + +=head1 SYNOPSIS + + urxvt -pe keysym-list + +=head1 DESCRIPTION + +The "list" keysym expansion was formerly part of the rxvt-unicode core, +and has been moved into this extension for backwards compatibility. You +shouldn't use this extension except for compatibility with old +configurations. + +=cut + + +sub on_register_command { + my ($self, $keysym, $state, $str) = @_; + + if ($str =~ /^list(.)/) { + my @list = split /\Q$1/, $str; + if (@list == 3 or @list == 4) { + $self->register_command ($keysym++, $state, "string:$list[1]$_$list[3]") + for split //, $list[2]; + + return 1; + } + + warn "unable to parse keysym '$str' as list, processing as normal keysym\n"; + } + + () +} |