Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:45:35+00:00 2026-06-10T08:45:35+00:00

I have been modifying my Emacs setup quite alot recently but I reached a

  • 0

I have been modifying my Emacs setup quite alot recently but I reached a problem which is starting to annoy me. I would like to be able to introduce additional modifier like keys. What I am trying to do, to make things clearer, is when I am in dired-mode (which doesn’t accept textual input so normal letters can be rebound) I would like it so that when I hold down the letter s and press j or l the cursor moves to the next and previous directory line respectively. Effectively making the s key act like a modifier.

I have looked into making the s apply a modifier such as super or hyper but those are all used for global things. Is this possible? if not then that’s a shame.

Edit:

There seems to be some confusion with what I’m after. If I define a normal key sequence such as

(define-key map (kbd "s j") 'dired-next-dirline)

Then I have to keep pressing the s key every time before I press j to move to the next directory line. This is not what I am looking for (not to sound angry :P) I want s to act like a modifier where I can keep the s key held down and keep tapping j to move down the lines.

I hope I have made this more clear. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:45:36+00:00Added an answer on June 10, 2026 at 8:45 am

    I dug around in the code and came up with this. It binds s j to my-dired-next-dirline, but right after you’ve done that, just j is enough to do it again. Any other key resets the temporary binding.

    Note that the function set-temporary-overlay-map was added in Emacs 24.2, which at the time of this writing hasn’t been released yet, so you’ll need to build Emacs from git.

    (defun my-dired-next-dirline ()
      (interactive)
      (dired-next-dirline 1)
      (set-temporary-overlay-map
       (let ((map (make-sparse-keymap)))
         (define-key map [?j] 'my-dired-next-dirline)
         map)
       nil))
    
    (eval-after-load "dired"
      '(progn
         (let ((prefix-map (make-sparse-keymap)))
           (define-key prefix-map "j" 'my-dired-next-dirline)  
           (define-key dired-mode-map "s" prefix-map))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been modifying/editing parts of the Android platform, but have run into a problem
I have a quite difficult problem with binary files. I have been asked to
Anyway here's my problem I have been modifying a whole C++ program to work
I noticed that in a lot of the programs I have been modifying recently
Questions similar to this have been asked before on SO, but they're not quite
Another co-worker and I have been heavily modifying the PHP Zookeeper extension but the
I have been working on modifying an existing FLVPlayback skin. Ideally I would like
So I have been tasked with modifying the Stories Overview report for TFS. I
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
Have been searching how to convert a dictionary to a string. But the results

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.