Your minor mode is defined as buffer-local. You can define it as global, for example:
(define-minor-mode my-keys-minor-mode "A minor mode so that my key settings override annoying major modes." :global t :lighter " my-keys")
But then your my-minibuffer-setup-hook will disable it also globally. Also, if it is global, and you basically always turn it on, you can omit :lighter " my-keys" , so your mode line does not fill up unnecessarily.
source share