mirror of
https://github.com/Cloudef/bemenu
synced 2024-11-22 17:02:05 +01:00
Clipboard: Switch C-y and C-Y
First, this behavior now matches that of dmenu. People switching over from dmenu might be used to this. I would argue, though, that it is more comfortable in general anyway: The "primary" selection is often easier to access, you can just select some text and be done with it, no need to reach for C-c (or even C-S-c in terminals). Some programs like XTerm can't even put text into the "clipboard" selection without special configuration. It thus makes sense to make this selection available with a hotkey that's easier to reach (I find C-y to be much more comfortable than C-Y). Only in rare circumstances do I need to access the "clipboard" selection. In practice, this change is *probably* not a (very) breaking change for users, because you very often have to select some text first using a mouse (thus putting it into the "primary" selection) before you can put it into the "clipboard" selection using something like C-c. This means that pasting from "primary" almost acts as a "magic" hotkey that does "the right thing".
This commit is contained in:
parent
62154d8e7b
commit
5b462ad76d
@ -203,10 +203,10 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode)
|
||||
return (mods & MOD_CTRL ? BM_KEY_RETURN : BM_KEY_UNICODE);
|
||||
|
||||
case XKB_KEY_y:
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_CLIPBOARD : BM_KEY_UNICODE);
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_PRIMARY : BM_KEY_UNICODE);
|
||||
|
||||
case XKB_KEY_Y:
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_PRIMARY : BM_KEY_UNICODE);
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_CLIPBOARD : BM_KEY_UNICODE);
|
||||
|
||||
case XKB_KEY_1:
|
||||
if ((mods & MOD_ALT)) return BM_KEY_CUSTOM_1;
|
||||
|
@ -150,10 +150,10 @@ poll_key(const struct bm_menu *menu, unsigned int *unicode)
|
||||
return (mods & MOD_CTRL ? BM_KEY_WORD_DELETE : BM_KEY_UNICODE);
|
||||
|
||||
case XK_y:
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_CLIPBOARD : BM_KEY_UNICODE);
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_PRIMARY : BM_KEY_UNICODE);
|
||||
|
||||
case XK_Y:
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_PRIMARY : BM_KEY_UNICODE);
|
||||
return (mods & MOD_CTRL ? BM_KEY_PASTE_CLIPBOARD : BM_KEY_UNICODE);
|
||||
|
||||
case XK_j:
|
||||
return (mods & MOD_ALT ? BM_KEY_DOWN : BM_KEY_UNICODE);
|
||||
|
@ -299,7 +299,7 @@ In the following examples, *C-x* means *<control-x>*, *M-x* means *<alt-x>* and
|
||||
Clear the filter.
|
||||
|
||||
*C-y, C-Y*
|
||||
Paste selection (*C-y* for "clipboard", *C-Y* for "primary").
|
||||
Paste selection (*C-y* for "primary", *C-Y* for "clipboard").
|
||||
|
||||
*M-[1-9]*
|
||||
Print selected items and exit with a custom error code 10 (*M-1*)
|
||||
|
Loading…
Reference in New Issue
Block a user