Skip to content

Commit 65932e6

Browse files
Cianidosdakra
authored andcommitted
Bind clipboard media keys (XF86Paste/Copy)
Route <XF86Paste> through ghostel-yank (mirroring C-y and darwin s-v) and map <XF86Copy> to kill-ring-save. Without explicit bindings these fall through to the global yank/kill-region, which write to the Emacs buffer and get overpainted by the next redraw.
1 parent f05e0db commit 65932e6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ghostel.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,9 @@ is non-nil.")
941941
(define-key map (kbd "C-y") #'ghostel-yank)
942942
(when (eq system-type 'darwin)
943943
(define-key map (kbd "s-v") #'ghostel-yank))
944+
;; Clipboard media keys
945+
(define-key map (kbd "<XF86Paste>") #'ghostel-yank)
946+
(define-key map (kbd "<XF86Copy>") #'kill-ring-save)
944947
(define-key map (kbd "M-y") #'ghostel-yank-pop)
945948
;; Terminal control via C-c prefix (pass through to Emacs, then handled here)
946949
(define-key map (kbd "C-c C-c") #'ghostel-send-C-c)

0 commit comments

Comments
 (0)