Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In modern web browsers and other software with text content, Space scrolls down more or less a screenful. ShiftSpace scrolls up in everything but less.

How can one use ShiftSpace to scroll up in less? Or alternatively, is there another pager (POSIX compatibility is my only requirement) that could do the job?

I was told some terminal emulators, and some terminal UI libraries (ncurses?), don't recognize ShiftSpace. Is that a valid issue?

share|improve this question
    
What's wrong with your PgUp button? Not big enough? –  goldilocks Aug 28 '13 at 19:16
    
@goldilocks: There's nothing wrong with wanting to use Shift-Space, especially if you're used to using it with other tools. It just happens to be impossible for less to distinguish between Space and Shift-Space. –  Keith Thompson Aug 28 '13 at 19:55
    
You could configure your terminal (emulator) to send b or ^B (0x2) upon <shift-Space>. Note that b is just above the space bar in many keyboard configurations –  Stéphane Chazelas Aug 28 '13 at 20:05
    
@KeithThompson : Just a friendly jibe I hope. I do empathize; I'd like / universally adopted as "search text" ala various common tools, but at the same time I am wary of imposing excessive meglomaniacal standards which make it even easier to do something that can be done with one (universally recognizable) keystroke anyway. Interesting to learn that in this case it is a technical limitation (see 200_success's answer) and not curmudgeonly design that explains. –  goldilocks Aug 28 '13 at 20:12
1  
@KeithThompson, see the translations resource for the VT100 widget. –  Stéphane Chazelas Aug 28 '13 at 20:25
show 1 more comment

2 Answers 2

I think you've brought up a culture clash caused by a technical limitation. Since Shift+Space generates the same output as Space, the Unix terminal model treats them identically. To distinguish between the two, you need a programming environment that supports key up / key down events. That is possible in X11 and in terminal emulators that support remapping keys. An example of remapping Shift+Space to PageUp:

# For [u]rxvt, in ~/.Xdefaults:
URxvt.keysym.Shift-space: \033[5~
share|improve this answer
1  
Most terminal emulators support remapping keys, so it's possible to do it with most terminal emulators (xterm -xrm 'XTerm.VT100.translations: #override Shift <KeyPress> space: string(0x2)' in xterm for instance, or you send the same sequence as sent upon <PageUp>). Of course, that would make entering text while holding the shift key awkward. –  Stéphane Chazelas Aug 28 '13 at 20:21
add comment

I've never heard of using shift-space.

Less will scroll up one line at a time with the 'k' key, and a page with the 'b' key or the 'ctrl-b' key combination. Page-up works too, but that is not 100% reliable, especially when working on slow network connections.

In order to scroll back more than one line at a time with 'k', type a number first - like this "10k" to go up 10 lines at once.

share|improve this answer
    
Downvoted because this didn't answer the question. –  strugee Sep 2 '13 at 6:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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