According to y-or-np documentation
Ask the user the question "y or n". Return t if the answer is "y". Accepts one argument, which is a display string to ask a question. It should end in space; y-or-np' adds (y or n)'. No, a confirmation of the response is requested; just one character is enough. Also accepts Space to indicate yes, or Delete to indicate no. (Actually, this uses the bindings in query-replace-map'; see the documentation of that variable for more information. In this case, the useful bindings are act', skip', recenter' and `quit '.)
So you need to add keys to query-replace-map Something like this
;; use the Russian '' (which is on the same ;; physical key as 'y') or '' (which shares ;; the key with 'n') in query-replace-map (define-key query-replace-map "" 'act) (define-key query-replace-map "" 'skip)
source share