0

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded.
My keybindings in particular are acting very odd.

I use some unorthodox keybinds; for example:
Ctrl+u = beginning-of-buffer and Ctrl+o = end-of-buffer
But now when using Emacs as a daemon they revert to their default behavior (universal-argument and insertline respectively).

Is my init.el file not loading correctly when my computer boots up?
If so, is there a way to modify the emacs.service file to fix this problem?

EDIT 1 (Suggested by Phil in the comments)

emacs.service file

[Unit]
Description=Emacs text editor
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/

[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(progn (setq kill-emacs-hook nil) (kill emacs))"
Restart=on-failure
TimeoutStartSec=0
Environment=SSH_AUTH_SOCK=%t/keyring/ssh

[Install]
WantedBy=default.target

keybindings.el file (This file is too large to show everything, so I'm just going to show a couple bindings, also note that this file gets imported into my init.el file)

(define-key input-decode-map (kbd "C-o")  (kbd "<control-o>"))
(define-key input-decode-map (kbd "C-u")  (kbd "<control-u>"))
(global-set-key (kbd "<control-o>")       'end-of-buffer)
(global-set-key (kbd "<control-u>")       'beginning-of-buffer)

Note that the above binds DO NOT work when I'm running emacsclient (as well as other binds), but they DO work when I'm running Emacs regularly without a server.

EDIT 2

I think I may have found a clue at this question: https://superuser.com/questions/537922/how-do-i-get-my-emacs-init-files-to-load-correctly-with-emacs-server

EDIT 3 (Suggested by Tyler in the comments)

keybindings.el file

(provide 'keybindings)

(global-unset-key (kbd "M-i"))
(global-unset-key (kbd "M-k"))
(global-unset-key (kbd "M-j"))
(global-unset-key (kbd "M-l"))
(global-unset-key (kbd "M-u"))
(global-unset-key (kbd "M-o"))

(global-set-key (kbd "M-i") 'previous-line)
(global-set-key (kbd "M-k") 'next-line)
(global-set-key (kbd "M-j") 'backward-char)
(global-set-key (kbd "M-l") 'forward-char)
(global-set-key (kbd "M-u") 'back-to-indentation)
(global-set-key (kbd "M-o") 'end-of-line)

;;; Functions pertaining to simple binds
(defun jd-scroll-down ()
  "Scrolling down conditional for buffers and minibuffers."
  (interactive)
  (if (minibufferp)
      (ivy-scroll-down-command)
    (scroll-down-command)))

(defun jd-scroll-up ()
  "Scrolling up conditional for buffers and minibuffers."
  (interactive)
  (if (minibufferp)
      (ivy-scroll-up-command)
    (scroll-up-command)))

(define-key input-decode-map (kbd "C-a")  (kbd "<control-a>"))
(define-key input-decode-map (kbd "C-b")  (kbd "<control-b>"))
(define-key input-decode-map (kbd "C-d")  (kbd "<control-d>"))
(define-key input-decode-map (kbd "C-e")  (kbd "<control-e>"))
(define-key input-decode-map (kbd "C-f")  (kbd "<control-f>"))
(define-key input-decode-map (kbd "C-h")  (kbd "<control-h>"))
(define-key input-decode-map (kbd "C-i")  (kbd "<control-i>"))
(define-key input-decode-map (kbd "C-j")  (kbd "<control-j>"))
(define-key input-decode-map (kbd "C-k")  (kbd "<control-k>"))
(define-key input-decode-map (kbd "C-l")  (kbd "<control-l>"))
(define-key input-decode-map (kbd "C-m")  (kbd "<control-m>"))
(define-key input-decode-map (kbd "C-n")  (kbd "<control-n>"))
(define-key input-decode-map (kbd "C-o")  (kbd "<control-o>"))
(define-key input-decode-map (kbd "C-p")  (kbd "<control-p>"))
(define-key input-decode-map (kbd "C-q")  (kbd "<control-q>"))
(define-key input-decode-map (kbd "C-r")  (kbd "<control-r>"))
(define-key input-decode-map (kbd "C-s")  (kbd "<control-s>"))
(define-key input-decode-map (kbd "C-t")  (kbd "<control-t>"))
(define-key input-decode-map (kbd "C-u")  (kbd "<control-u>"))
(define-key input-decode-map (kbd "C-w")  (kbd "<control-w>"))
(define-key input-decode-map (kbd "C-y")  (kbd "<control-y>"))
(define-key input-decode-map (kbd "C-;")  (kbd "<control-scolon>"))
(define-key input-decode-map (kbd "C-,")  (kbd "<control-comma>"))
(define-key input-decode-map (kbd "C-.")  (kbd "<control-period>"))
(define-key input-decode-map (kbd "C-/")  (kbd "<control-slash>"))

(define-key input-decode-map (kbd "M-a")  (kbd "<meta-a>"))
(define-key input-decode-map (kbd "M-b")  (kbd "<meta-b>"))
(define-key input-decode-map (kbd "M-c")  (kbd "<meta-c>"))
(define-key input-decode-map (kbd "M-d")  (kbd "<meta-d>"))
(define-key input-decode-map (kbd "M-e")  (kbd "<meta-e>"))
(define-key input-decode-map (kbd "M-f")  (kbd "<meta-f>"))
(define-key input-decode-map (kbd "M-g")  (kbd "<meta-g>"))
(define-key input-decode-map (kbd "M-h")  (kbd "<meta-h>"))
(define-key input-decode-map (kbd "M-i")  (kbd "<meta-i>"))
(define-key input-decode-map (kbd "M-j")  (kbd "<meta-j>"))
(define-key input-decode-map (kbd "M-k")  (kbd "<meta-k>"))
(define-key input-decode-map (kbd "M-l")  (kbd "<meta-l>"))
(define-key input-decode-map (kbd "M-m")  (kbd "<meta-m>"))
(define-key input-decode-map (kbd "M-n")  (kbd "<meta-n>"))
(define-key input-decode-map (kbd "M-o")  (kbd "<meta-o>"))
(define-key input-decode-map (kbd "M-p")  (kbd "<meta-p>"))
(define-key input-decode-map (kbd "M-q")  (kbd "<meta-q>"))
(define-key input-decode-map (kbd "M-r")  (kbd "<meta-r>"))
(define-key input-decode-map (kbd "M-s")  (kbd "<meta-s>"))
(define-key input-decode-map (kbd "M-t")  (kbd "<meta-t>"))
(define-key input-decode-map (kbd "M-u")  (kbd "<meta-u>"))
(define-key input-decode-map (kbd "M-v")  (kbd "<meta-v>"))
(define-key input-decode-map (kbd "M-w")  (kbd "<meta-w>"))
(define-key input-decode-map (kbd "M-y")  (kbd "<meta-y>"))
(define-key input-decode-map (kbd "M-z")  (kbd "<meta-z>"))
(define-key input-decode-map (kbd "M-;")  (kbd "<meta-scolon>"))
(define-key input-decode-map (kbd "M-,")  (kbd "<meta-comma>"))
(define-key input-decode-map (kbd "M-.")  (kbd "<meta-period>"))
(define-key input-decode-map (kbd "M-/")  (kbd "<meta-slash>"))

(define-key input-decode-map (kbd "C-M-a")  (kbd "<control-meta-a>"))
(define-key input-decode-map (kbd "C-M-b")  (kbd "<control-meta-b>"))
(define-key input-decode-map (kbd "C-M-c")  (kbd "<control-meta-c>"))
(define-key input-decode-map (kbd "C-M-d")  (kbd "<control-meta-d>"))
(define-key input-decode-map (kbd "C-M-e")  (kbd "<control-meta-e>"))
(define-key input-decode-map (kbd "C-M-f")  (kbd "<control-meta-f>"))
(define-key input-decode-map (kbd "C-M-g")  (kbd "<control-meta-g>"))
(define-key input-decode-map (kbd "C-M-h")  (kbd "<control-meta-h>"))
(define-key input-decode-map (kbd "C-M-i")  (kbd "<control-meta-i>"))
(define-key input-decode-map (kbd "C-M-j")  (kbd "<control-meta-j>"))
(define-key input-decode-map (kbd "C-M-k")  (kbd "<control-meta-k>"))
(define-key input-decode-map (kbd "C-M-l")  (kbd "<control-meta-l>"))
(define-key input-decode-map (kbd "C-M-m")  (kbd "<control-meta-m>"))
(define-key input-decode-map (kbd "C-M-n")  (kbd "<control-meta-n>"))
(define-key input-decode-map (kbd "C-M-o")  (kbd "<control-meta-o>"))
(define-key input-decode-map (kbd "C-M-p")  (kbd "<control-meta-p>"))
(define-key input-decode-map (kbd "C-M-q")  (kbd "<control-meta-q>"))
(define-key input-decode-map (kbd "C-M-r")  (kbd "<control-meta-r>"))
(define-key input-decode-map (kbd "C-M-s")  (kbd "<control-meta-s>"))
(define-key input-decode-map (kbd "C-M-t")  (kbd "<control-meta-t>"))
(define-key input-decode-map (kbd "C-M-u")  (kbd "<control-meta-u>"))
(define-key input-decode-map (kbd "C-M-v")  (kbd "<control-meta-v>"))
(define-key input-decode-map (kbd "C-M-w")  (kbd "<control-meta-w>"))
(define-key input-decode-map (kbd "C-M-x")  (kbd "<control-meta-x>"))
(define-key input-decode-map (kbd "C-M-y")  (kbd "<control-meta-y>"))
(define-key input-decode-map (kbd "C-M-z")  (kbd "<control-meta-z>"))
(define-key input-decode-map (kbd "C-M-;")  (kbd "<control-meta-scolon>"))
(define-key input-decode-map (kbd "C-M-,")  (kbd "<control-meta-comma>"))
(define-key input-decode-map (kbd "C-M-.")  (kbd "<control-meta-period>"))
(define-key input-decode-map (kbd "C-M-/")  (kbd "<control-meta-slash>"))

(define-key input-decode-map (kbd "C-S-a")  (kbd "<control-shift-a>"))
(define-key input-decode-map (kbd "C-S-b")  (kbd "<control-shift-b>"))
(define-key input-decode-map (kbd "C-S-c")  (kbd "<control-shift-c>"))
(define-key input-decode-map (kbd "C-S-d")  (kbd "<control-shift-d>"))
(define-key input-decode-map (kbd "C-S-e")  (kbd "<control-shift-e>"))
(define-key input-decode-map (kbd "C-S-f")  (kbd "<control-shift-f>"))
(define-key input-decode-map (kbd "C-S-g")  (kbd "<control-shift-g>"))
(define-key input-decode-map (kbd "C-S-h")  (kbd "<control-shift-h>"))
(define-key input-decode-map (kbd "C-S-i")  (kbd "<control-shift-i>"))
(define-key input-decode-map (kbd "C-S-j")  (kbd "<control-shift-j>"))
(define-key input-decode-map (kbd "C-S-k")  (kbd "<control-shift-k>"))
(define-key input-decode-map (kbd "C-S-l")  (kbd "<control-shift-l>"))
(define-key input-decode-map (kbd "C-S-m")  (kbd "<control-shift-m>"))
(define-key input-decode-map (kbd "C-S-n")  (kbd "<control-shift-n>"))
(define-key input-decode-map (kbd "C-S-o")  (kbd "<control-shift-o>"))
(define-key input-decode-map (kbd "C-S-p")  (kbd "<control-shift-p>"))
(define-key input-decode-map (kbd "C-S-q")  (kbd "<control-shift-q>"))
(define-key input-decode-map (kbd "C-S-r")  (kbd "<control-shift-r>"))
(define-key input-decode-map (kbd "C-S-s")  (kbd "<control-shift-s>"))
(define-key input-decode-map (kbd "C-S-t")  (kbd "<control-shift-t>"))
(define-key input-decode-map (kbd "C-S-u")  (kbd "<control-shift-u>"))
(define-key input-decode-map (kbd "C-S-v")  (kbd "<control-shift-v>"))
(define-key input-decode-map (kbd "C-S-w")  (kbd "<control-shift-w>"))
(define-key input-decode-map (kbd "C-S-x")  (kbd "<control-shift-x>"))
(define-key input-decode-map (kbd "C-S-y")  (kbd "<control-shift-y>"))
(define-key input-decode-map (kbd "C-S-z")  (kbd "<control-shift-z>"))
(define-key input-decode-map (kbd "C-S-;")  (kbd "<control-shift-scolon>"))
(define-key input-decode-map (kbd "C-S-,")  (kbd "<control-shift-comma>"))
(define-key input-decode-map (kbd "C-S-.")  (kbd "<control-shift-period>"))
(define-key input-decode-map (kbd "C-S-/")  (kbd "<control-shift-slash>"))

(define-key input-decode-map (kbd "M-S-a")  (kbd "<meta-shift-a>"))
(define-key input-decode-map (kbd "M-S-b")  (kbd "<meta-shift-b>"))
(define-key input-decode-map (kbd "M-S-c")  (kbd "<meta-shift-c>"))
(define-key input-decode-map (kbd "M-S-d")  (kbd "<meta-shift-d>"))
(define-key input-decode-map (kbd "M-S-e")  (kbd "<meta-shift-e>"))
(define-key input-decode-map (kbd "M-S-f")  (kbd "<meta-shift-f>"))
(define-key input-decode-map (kbd "M-S-g")  (kbd "<meta-shift-g>"))
(define-key input-decode-map (kbd "M-S-h")  (kbd "<meta-shift-h>"))
(define-key input-decode-map (kbd "M-S-i")  (kbd "<meta-shift-i>"))
(define-key input-decode-map (kbd "M-S-j")  (kbd "<meta-shift-j>"))
(define-key input-decode-map (kbd "M-S-k")  (kbd "<meta-shift-k>"))
(define-key input-decode-map (kbd "M-S-l")  (kbd "<meta-shift-l>"))
(define-key input-decode-map (kbd "M-S-m")  (kbd "<meta-shift-m>"))
(define-key input-decode-map (kbd "M-S-n")  (kbd "<meta-shift-n>"))
(define-key input-decode-map (kbd "M-S-o")  (kbd "<meta-shift-o>"))
(define-key input-decode-map (kbd "M-S-p")  (kbd "<meta-shift-p>"))
(define-key input-decode-map (kbd "M-S-q")  (kbd "<meta-shift-q>"))
(define-key input-decode-map (kbd "M-S-r")  (kbd "<meta-shift-r>"))
(define-key input-decode-map (kbd "M-S-s")  (kbd "<meta-shift-s>"))
(define-key input-decode-map (kbd "M-S-t")  (kbd "<meta-shift-t>"))
(define-key input-decode-map (kbd "M-S-u")  (kbd "<meta-shift-u>"))
(define-key input-decode-map (kbd "M-S-v")  (kbd "<meta-shift-v>"))
(define-key input-decode-map (kbd "M-S-w")  (kbd "<meta-shift-w>"))
(define-key input-decode-map (kbd "M-S-x")  (kbd "<meta-shift-x>"))
(define-key input-decode-map (kbd "M-S-y")  (kbd "<meta-shift-y>"))
(define-key input-decode-map (kbd "M-S-z")  (kbd "<meta-shift-z>"))
(define-key input-decode-map (kbd "M-S-;")  (kbd "<meta-shift-scolon>"))
(define-key input-decode-map (kbd "M-S-,")  (kbd "<meta-shift-comma>"))
(define-key input-decode-map (kbd "M-S-.")  (kbd "<meta-shift-period>"))
(define-key input-decode-map (kbd "M-S-/")  (kbd "<meta-shift-slash>"))

(define-key input-decode-map (kbd "C-M-S-a")  (kbd "<control-meta-shift-a>"))
(define-key input-decode-map (kbd "C-M-S-b")  (kbd "<control-meta-shift-b>"))
(define-key input-decode-map (kbd "C-M-S-c")  (kbd "<control-meta-shift-c>"))
(define-key input-decode-map (kbd "C-M-S-d")  (kbd "<control-meta-shift-d>"))
(define-key input-decode-map (kbd "C-M-S-e")  (kbd "<control-meta-shift-e>"))
(define-key input-decode-map (kbd "C-M-S-f")  (kbd "<control-meta-shift-f>"))
(define-key input-decode-map (kbd "C-M-S-g")  (kbd "<control-meta-shift-g>"))
(define-key input-decode-map (kbd "C-M-S-h")  (kbd "<control-meta-shift-h>"))
(define-key input-decode-map (kbd "C-M-S-i")  (kbd "<control-meta-shift-i>"))
(define-key input-decode-map (kbd "C-M-S-j")  (kbd "<control-meta-shift-j>"))
(define-key input-decode-map (kbd "C-M-S-k")  (kbd "<control-meta-shift-k>"))
(define-key input-decode-map (kbd "C-M-S-l")  (kbd "<control-meta-shift-l>"))
(define-key input-decode-map (kbd "C-M-S-m")  (kbd "<control-meta-shift-m>"))
(define-key input-decode-map (kbd "C-M-S-n")  (kbd "<control-meta-shift-n>"))
(define-key input-decode-map (kbd "C-M-S-o")  (kbd "<control-meta-shift-o>"))
(define-key input-decode-map (kbd "C-M-S-p")  (kbd "<control-meta-shift-p>"))
(define-key input-decode-map (kbd "C-M-S-q")  (kbd "<control-meta-shift-q>"))
(define-key input-decode-map (kbd "C-M-S-r")  (kbd "<control-meta-shift-r>"))
(define-key input-decode-map (kbd "C-M-S-s")  (kbd "<control-meta-shift-s>"))
(define-key input-decode-map (kbd "C-M-S-t")  (kbd "<control-meta-shift-t>"))
(define-key input-decode-map (kbd "C-M-S-u")  (kbd "<control-meta-shift-u>"))
(define-key input-decode-map (kbd "C-M-S-v")  (kbd "<control-meta-shift-v>"))
(define-key input-decode-map (kbd "C-M-S-w")  (kbd "<control-meta-shift-w>"))
(define-key input-decode-map (kbd "C-M-S-x")  (kbd "<control-meta-shift-x>"))
(define-key input-decode-map (kbd "C-M-S-y")  (kbd "<control-meta-shift-y>"))
(define-key input-decode-map (kbd "C-M-S-z")  (kbd "<control-meta-shift-z>"))
(define-key input-decode-map (kbd "C-M-S-;")  (kbd "<control-meta-shift-scolon>"))
(define-key input-decode-map (kbd "C-M-S-,")  (kbd "<control-meta-shift-comma>"))
(define-key input-decode-map (kbd "C-M-S-.")  (kbd "<control-meta-shift-period>"))
(define-key input-decode-map (kbd "C-M-S-/")  (kbd "<control-meta-shift-slash>"))

....


ATTEMPT 1 (As suggested by Phil in the comments)

init.el file

(defun my-debord-translations (&optional frame)
  "Re-map keys in the current terminal."
  (require 'keybindings "/home/i/.emacs.d/keybindings.el"))
;; Evaluate both now (for non-daemon emacs) and upon frame creation
;; (for new terminals via emacsclient).
(my-debord-translations)
(add-hook 'after-make-frame-functions 'my-debord-translations)


ATTEMPT 2

init.el file

(require 'keybindings "/home/i/.emacs.d/keybindings.el")

;; Evaluate both now (for non-daemon emacs) and upon frame creation
;; (for new terminals via emacsclient).
(my-debord-translations)
(add-hook 'after-make-frame-functions 'my-debord-translations)

keybindings.el file

(provide 'keybindings)

....

(defun my-debord-translations (&optional frame)
  "Re-map keys in the current terminal."
   (define-key input-decode-map (kbd "C-a")  (kbd "<control-a>"))
   (define-key input-decode-map (kbd "C-b")  (kbd "<control-b>"))
   (define-key input-decode-map (kbd "C-d")  (kbd "<control-d>"))
   (define-key input-decode-map (kbd "C-e")  (kbd "<control-e>"))
   (define-key input-decode-map (kbd "C-f")  (kbd "<control-f>"))
   (define-key input-decode-map (kbd "C-h")  (kbd "<control-h>"))
   (define-key input-decode-map (kbd "C-i")  (kbd "<control-i>"))
   (define-key input-decode-map (kbd "C-j")  (kbd "<control-j>"))
   (define-key input-decode-map (kbd "C-k")  (kbd "<control-k>"))
   (define-key input-decode-map (kbd "C-l")  (kbd "<control-l>"))
   (define-key input-decode-map (kbd "C-m")  (kbd "<control-m>"))
   (define-key input-decode-map (kbd "C-n")  (kbd "<control-n>"))
   (define-key input-decode-map (kbd "C-o")  (kbd "<control-o>"))
   (define-key input-decode-map (kbd "C-p")  (kbd "<control-p>"))
   (define-key input-decode-map (kbd "C-q")  (kbd "<control-q>"))
   (define-key input-decode-map (kbd "C-r")  (kbd "<control-r>"))
   (define-key input-decode-map (kbd "C-s")  (kbd "<control-s>"))
   (define-key input-decode-map (kbd "C-t")  (kbd "<control-t>"))
   (define-key input-decode-map (kbd "C-u")  (kbd "<control-u>"))
   (define-key input-decode-map (kbd "C-w")  (kbd "<control-w>"))
   (define-key input-decode-map (kbd "C-y")  (kbd "<control-y>"))
   (define-key input-decode-map (kbd "C-;")  (kbd "<control-scolon>"))
   (define-key input-decode-map (kbd "C-,")  (kbd "<control-comma>"))
   (define-key input-decode-map (kbd "C-.")  (kbd "<control-period>"))
   (define-key input-decode-map (kbd "C-/")  (kbd "<control-slash>"))

   (define-key input-decode-map (kbd "M-a")  (kbd "<meta-a>"))
   (define-key input-decode-map (kbd "M-b")  (kbd "<meta-b>"))
   (define-key input-decode-map (kbd "M-c")  (kbd "<meta-c>"))
   (define-key input-decode-map (kbd "M-d")  (kbd "<meta-d>"))
   (define-key input-decode-map (kbd "M-e")  (kbd "<meta-e>"))
   (define-key input-decode-map (kbd "M-f")  (kbd "<meta-f>"))
   (define-key input-decode-map (kbd "M-g")  (kbd "<meta-g>"))
   (define-key input-decode-map (kbd "M-h")  (kbd "<meta-h>"))
   (define-key input-decode-map (kbd "M-i")  (kbd "<meta-i>"))
   (define-key input-decode-map (kbd "M-j")  (kbd "<meta-j>"))
   (define-key input-decode-map (kbd "M-k")  (kbd "<meta-k>"))
   (define-key input-decode-map (kbd "M-l")  (kbd "<meta-l>"))
   (define-key input-decode-map (kbd "M-m")  (kbd "<meta-m>"))
   (define-key input-decode-map (kbd "M-n")  (kbd "<meta-n>"))
   (define-key input-decode-map (kbd "M-o")  (kbd "<meta-o>"))
   (define-key input-decode-map (kbd "M-p")  (kbd "<meta-p>"))
   (define-key input-decode-map (kbd "M-q")  (kbd "<meta-q>"))
   (define-key input-decode-map (kbd "M-r")  (kbd "<meta-r>"))
   (define-key input-decode-map (kbd "M-s")  (kbd "<meta-s>"))
   (define-key input-decode-map (kbd "M-t")  (kbd "<meta-t>"))
   (define-key input-decode-map (kbd "M-u")  (kbd "<meta-u>"))
   (define-key input-decode-map (kbd "M-v")  (kbd "<meta-v>"))
   (define-key input-decode-map (kbd "M-w")  (kbd "<meta-w>"))
   (define-key input-decode-map (kbd "M-y")  (kbd "<meta-y>"))
   (define-key input-decode-map (kbd "M-z")  (kbd "<meta-z>"))
   (define-key input-decode-map (kbd "M-;")  (kbd "<meta-scolon>"))
   (define-key input-decode-map (kbd "M-,")  (kbd "<meta-comma>"))
   (define-key input-decode-map (kbd "M-.")  (kbd "<meta-period>"))
   (define-key input-decode-map (kbd "M-/")  (kbd "<meta-slash>"))

   (define-key input-decode-map (kbd "C-M-a")  (kbd "<control-meta-a>"))
   (define-key input-decode-map (kbd "C-M-b")  (kbd "<control-meta-b>"))
   (define-key input-decode-map (kbd "C-M-c")  (kbd "<control-meta-c>"))
   (define-key input-decode-map (kbd "C-M-d")  (kbd "<control-meta-d>"))
   (define-key input-decode-map (kbd "C-M-e")  (kbd "<control-meta-e>"))
   (define-key input-decode-map (kbd "C-M-f")  (kbd "<control-meta-f>"))
   (define-key input-decode-map (kbd "C-M-g")  (kbd "<control-meta-g>"))
   (define-key input-decode-map (kbd "C-M-h")  (kbd "<control-meta-h>"))
   (define-key input-decode-map (kbd "C-M-i")  (kbd "<control-meta-i>"))
   (define-key input-decode-map (kbd "C-M-j")  (kbd "<control-meta-j>"))
   (define-key input-decode-map (kbd "C-M-k")  (kbd "<control-meta-k>"))
   (define-key input-decode-map (kbd "C-M-l")  (kbd "<control-meta-l>"))
   (define-key input-decode-map (kbd "C-M-m")  (kbd "<control-meta-m>"))
   (define-key input-decode-map (kbd "C-M-n")  (kbd "<control-meta-n>"))
   (define-key input-decode-map (kbd "C-M-o")  (kbd "<control-meta-o>"))
   (define-key input-decode-map (kbd "C-M-p")  (kbd "<control-meta-p>"))
   (define-key input-decode-map (kbd "C-M-q")  (kbd "<control-meta-q>"))
   (define-key input-decode-map (kbd "C-M-r")  (kbd "<control-meta-r>"))
   (define-key input-decode-map (kbd "C-M-s")  (kbd "<control-meta-s>"))
   (define-key input-decode-map (kbd "C-M-t")  (kbd "<control-meta-t>"))
   (define-key input-decode-map (kbd "C-M-u")  (kbd "<control-meta-u>"))
   (define-key input-decode-map (kbd "C-M-v")  (kbd "<control-meta-v>"))
   (define-key input-decode-map (kbd "C-M-w")  (kbd "<control-meta-w>"))
   (define-key input-decode-map (kbd "C-M-x")  (kbd "<control-meta-x>"))
   (define-key input-decode-map (kbd "C-M-y")  (kbd "<control-meta-y>"))
   (define-key input-decode-map (kbd "C-M-z")  (kbd "<control-meta-z>"))
   (define-key input-decode-map (kbd "C-M-;")  (kbd "<control-meta-scolon>"))
   (define-key input-decode-map (kbd "C-M-,")  (kbd "<control-meta-comma>"))
   (define-key input-decode-map (kbd "C-M-.")  (kbd "<control-meta-period>"))
   (define-key input-decode-map (kbd "C-M-/")  (kbd "<control-meta-slash>")))

....
  • 1
    Show us this "emacs.service" file (and maybe mention how it's used); and show us the config which isn't working. At the moment you've basically said "Something doesn't work; how do I fix that?" – phils Jul 19 '18 at 23:32
  • 1
    The Q&A you linked to is correct. input-decode-map is a terminal-local variable, so your code only affects the current 'terminal' at the time the daemon runs -- so when you actually create a frame of your own, those bindings are not seen. – phils Jul 20 '18 at 0:56
  • 1
    emacs.stackexchange.com/a/31359/454 is an effective duplicate -- you can use the same technique of using after-make-frame-functions to configure input-decode-map in every terminal. – phils Jul 20 '18 at 0:59
  • 5
    Possible duplicate of local-function-key-map gets overwritten by emacsclient -- different keymap, but the exact same issue. Just make the input-decode-map bindings inside the custom function. – phils Jul 20 '18 at 1:05
  • 1
    See also Multiple Terminals in the manual. – phils Jul 20 '18 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.