I've created two functions, scroll-window-up and scroll-window-down, and want to add these to ace-window's dispatch list:

(add-to-list 'aw-dispatch-alist
             '(?S gpolonkai/scroll-window-down " Scroll window down"))
(add-to-list 'aw-dispatch-alist
             '(?s gpolonkai/scroll-window-up " Scroll window up"))

When I press s in dispatch time, the selected window scrolls up,but for S it says there is no such candidate. I remember it worked on my other machine, so there may be some differences in how the two OS handles keys. If I'm right, is there a more reliable way to distinguish between upper and lower case characters? If not, can I specify C-s or M-s where it needs a character?

Edit: it seems I messed up a bit… the error message I get when pressing S is:

Args out of range: "S", 0, 5
  • Which two OS's are you dealing with? Upper and lower case letters work for me.
    – glucas
    Feb 23, 2017 at 22:40
  • Windows and Fedora Linux. And it turns out the same problem exists on my Android phone with Termux. Feb 23, 2017 at 22:42

1 Answer 1


I'm not sure why S might not be working for you, but you can use a modifier key.

Try this: invoke ace-window, and hit for example C-s at the dispatch prompt. The error message actually tells you what character was sent, e.g.

No such candidate, 19

You can use that to add C-s to your dispatch list:

(add-to-list 'aw-dispatch-alist '(19 some-command " Do Something"))
  • You may be able to get S working the same way, i.e. use the number reported in the "no such candidate" message you are seeing to define the dispatch command.
    – glucas
    Feb 23, 2017 at 22:51
  • Thanks for the C-s workaround! It works fine, although I hope I will get an answer less hacky. I corrected my question as it seems I messed it up a bit. Sorry about that. Feb 23, 2017 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.