Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #22762

    npnilsson
    Participant

    sometimes it would be very handy to not have the cursor moved up and down when pressing the up/down keys but have the window scrolled up and down and keep the cursor position instead. that way the biggest possible amount of the document around the cursor is shown at all times. i guess this only applies to the up/down and not the left/right movements…is there such a feature already somewhere hidden in the settings and i just don’t find it? thanks in advance!

    #22763

    Patrick C
    Participant

    Emeditor’s default shortcut for this is ctrl + ↑ and ctrl + ↓

    Speaking of which:
    Back in the old days the scroll lock key would do this, but these days that functionality seems to be almost extinct.

    #22764

    Patrick C
    Participant

    Perhaps I first misunderstood you. If you want both the cursor and the window to move you’ll have to activate the “Move Cursor by Scrolling check box” option – I’ll get back to you with a macro to do this.

    #22765

    npnilsson
    Participant

    thanks so much for the answer! i rather meant, that the cursor should always stay vertically in the middle of the window (if the content is larger than the window). And instead of having the cursor moved up and down, only the window should scroll…ctrl+↑ and ctrl↓ also moves the cursor up and down…

    #22766

    Patrick C
    Participant

    Use the following code for toggling:

    // Toggle the scrolling behaviour
       // !!! Important: It seems that assigning to cfg is required!              !!!
       // !!!   Simply executing document.Config.Save(); seems to have no effect  !!!
    cfg = document.Config;
    cfg.Scroll.MoveCursorScroll = !(cfg.Scroll.MoveCursorScroll);
    cfg.Save();
    
    // Add a message to the status bar
    if (cfg.Scroll.MoveCursorScroll)
      status = "Fixed cursor scrolling is on";
    else
      status = "Fixed cursor scrolling is off";

    Copy paste to a text file, and save as YourMacroNameOfChoice.jsee
    Add this to “MyMacros” under Macros Customise Add (under MyMacros)

    You can now assign a shortcut to that Macro (under Tools Properties for All ConfigurationsKeyboardCategory: My Macros + Commands: YourMacroNameOfChoice

    When toggling, the status of the setting is shown on the bottom left status bar.

    #22773

    npnilsson
    Participant

    Hey Patrick, sorry to answer so late. Thank you sooooo much for your help. It works just wonderfully. Great help! This makes it a lot easier…I first misunderstood your first answer, the checkbox did the trick, but I didn’t find it since I use a localized version of emeditor…now the macro is even a lot more comfortable. Thank you so much again, I really appreciate it!

    #22774

    Patrick C
    Participant

    You’re welcome. Glad I could help.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.