You are not logged in.

#1 2019-12-01 05:32:19

ToMmyDong
Member
Registered: 2019-01-22
Posts: 4

[SOLVED] Key binding in terminal

My terminal do not work with some key binding.

When I press pagedown with shift, only "2~" shows up.
(I expected it to scroll down as I patched it, and did compile it)

Since I started to learn arch yesterday,  I have no idea who handle this behavior.

I'm currently using xorg, dwm, st, zsh

Last edited by ToMmyDong (2019-12-01 16:29:13)

Offline

#2 2019-12-01 07:56:44

seth
Member
Registered: 2012-09-03
Posts: 13,080

Re: [SOLVED] Key binding in terminal

(I expected it to scroll down as I patched it, and did compile it)

You'll have to elaborate and "prove" this since what you describe is the stock st behavior.
- What patch?
- errors during compilation?
- did you override your former st binary? What st binary is actually invoked?

Offline

#3 2019-12-01 11:48:23

xerxes_
Member
Registered: 2018-04-29
Posts: 135

Re: [SOLVED] Key binding in terminal

Not all terminals support all key bindings (especially some small and slim like st may not support), for example: xterm, urxvt supports Shift+PageDown/PageUp but not Shift+Home/End, termite, lxterminal, xfce4-terminal, konsole supports previously mentioned key bindings and many more.

Offline

#4 2019-12-01 12:48:12

ToMmyDong
Member
Registered: 2019-01-22
Posts: 4

Re: [SOLVED] Key binding in terminal

I patch "st-scrollback-0.8.2.diff" from https://st.suckless.org/patches/scrollback/

I didn't got any error patching or compilation.

I've changed other config to make sure I'm overriding the right file.

Offline

#5 2019-12-01 15:25:59

seth
Member
Registered: 2012-09-03
Posts: 13,080

Re: [SOLVED] Key binding in terminal

config.def.h:

…
	{ ShiftMask,            XK_Page_Up,     kscrollup,      {.i = +1} },
	{ ShiftMask,            XK_Page_Down,   kscrolldown,    {.i = +1} },
…

don't forget to remove config.h (to have make recreate it)

Offline

#6 2019-12-01 16:06:57

ToMmyDong
Member
Registered: 2019-01-22
Posts: 4

Re: [SOLVED] Key binding in terminal

Thanks, that's the point. It works now.

Btw. I'm confused with the logic behind. Why is it necessary to have such file like config.h? It looks like it is just copying config.def.h if it does not exist. But why don't it just compile with config.def.h?

Can I modify the config.def.h arbitrary? Will modify manually make future patches fail?

Offline

#7 2019-12-01 16:23:33

seth
Member
Registered: 2012-09-03
Posts: 13,080

Re: [SOLVED] Key binding in terminal

You're supposed to edit config.h and leave config.def.h alone, but that sucks, because everytime you apply a patch (or there's an update to st's config.def.h) you've to regenerate config.h and edit it to your likings.
Patches can"fail" all the time w/ the st approach because many features come in patches that can collide easily (in all files, not only config.def.h). You then have to reolve the conflicts locally.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#8 2019-12-01 16:29:50

ToMmyDong
Member
Registered: 2019-01-22
Posts: 4

Re: [SOLVED] Key binding in terminal

Thanks for your help smile

Offline

Board footer

Powered by FluxBB