OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Configuring byobu (in termux) on Cosmo
Charlie Stross
post Dec 26 2019, 09:35 AM
Post #1





Group: Members
Posts: 49
Joined: 2-February 18
Member No.: 817,351



I'm trying to use byobu under termux on the Cosmo (in preference to tmux).

However, byobu relies on function keys to interactively create/move/resize terminal windows.

Does anyone know how to access and/or bind function keys on the Cosmo (which doesn't actually *have* F1, F2, etc as separate keys)? Failing that, has anyone got a working boybu-config that uses tmux command keystrokes (ctrl-B whatevs) to control it?
Go to the top of the page
 
+Quote Post
vldmr
post Dec 26 2019, 01:33 PM
Post #2





Group: Members
Posts: 53
Joined: 23-November 19
From: US
Member No.: 860,135



In other applications (mc) alt-1 through alt-0 work for f1 through f10. Btw, for escape works alt-space, in mc or vim.

For multiplexer I use screen with the same config I have on other computers.
Go to the top of the page
 
+Quote Post
Charlie Stross
post Dec 27 2019, 04:49 AM
Post #3





Group: Members
Posts: 49
Joined: 2-February 18
Member No.: 817,351



QUOTE(vldmr @ Dec 26 2019, 09:33 PM) *
In other applications (mc) alt-1 through alt-0 work for f1 through f10. Btw, for escape works alt-space, in mc or vim.


Huh. byobu in termux seems to pass alt-1 and alt-0 directly through to mc. Meanwhile, other keystrokes (Ctrl-a ! -- toggle key bindings off/on -- and Ctrl-a $ -- status) seem to be bound to other commands.

... And then, while poking around inside the byobu keyboard binding files, I seem to have kernel panicked my Cosmo!

I'll update this if I find anything. But I suspect, for now, the pre-packaged byobu in the termux repos might be a rather bad idea.

So byobu ships with termux configured as a back-end, which is fine; and turns out to obey the termux keystroke commands -- which is fine, i can use them instead of the inexplicable vanishing function keystrokes -- except that the modifier key is ctrl-a, not ctrl-b. And this isn't visible anywhere in the man pages, because fsck documentation (and fsck gnu emacs, which is apparently why there's a program -- byobu-ctrl-a -- for messing with the behaviour of ctrl-a under byobo).

(Learning this cost me an hour. I now have a working byobu setup on the Cosmo (and Gemini), and one less hour in my life.
Go to the top of the page
 
+Quote Post
vldmr
post Dec 27 2019, 06:23 AM
Post #4





Group: Members
Posts: 53
Joined: 23-November 19
From: US
Member No.: 860,135



I never understood why ctrl-a was picked as default modifier - the key is widely used in many programs, like anything using readline. Ctrl-b does make more sense. But myself I set it to ctrl-\ in my config that I carry around. I have not had to deal with any program yet that reserves that by default
Go to the top of the page
 
+Quote Post
Charlie Stross
post Dec 27 2019, 08:49 AM
Post #5





Group: Members
Posts: 49
Joined: 2-February 18
Member No.: 817,351



Alas, ctrl-\ is a bad choice for the Gemini/Cosmo layout (backslash is Fn-3, so it's a three-finger salute).
Go to the top of the page
 
+Quote Post
vldmr
post Dec 27 2019, 09:36 AM
Post #6





Group: Members
Posts: 53
Joined: 23-November 19
From: US
Member No.: 860,135



QUOTE(Charlie Stross @ Dec 27 2019, 10:49 AM) *
Alas, ctrl-\ is a bad choice for the Gemini/Cosmo layout (backslash is Fn-3, so it's a three-finger salute).

Oh, I see your problem now. Well, on my cosmo it is right where it is found on other keyboards around here - a dedicated key next to enter key. You might be able to utilize corresponding key on your layout.
Attached Image
Go to the top of the page
 
+Quote Post
jankratochvil
post Dec 28 2019, 06:32 AM
Post #7





Group: Members
Posts: 8
Joined: 21-June 19
Member No.: 850,435



QUOTE(vldmr @ Dec 26 2019, 11:33 PM) *
Btw, for escape works alt-space, in mc or vim.


OK, alt-escape does work for VIM, thanks. But still is there a way to make the physical Escape key working as a normal Escape key? I have already bugreported it to Planet as it looks to me as the Cosmo keyboard driver problem as vtshowkeys also cannot catch the Escape key (and it quits from Termux to laucher).
Go to the top of the page
 
+Quote Post
vldmr
post Dec 28 2019, 07:55 AM
Post #8





Group: Members
Posts: 53
Joined: 23-November 19
From: US
Member No.: 860,135



QUOTE(jankratochvil @ Dec 28 2019, 08:32 AM) *
OK, alt-escape does work for VIM, thanks. But still is there a way to make the physical Escape key working as a normal Escape key? I have already bugreported it to Planet as it looks to me as the Cosmo keyboard driver problem as vtshowkeys also cannot catch the Escape key (and it quits from Termux to laucher).

My understanding that escape is reprogrammed to generate key press for hardware "back" button. Which kind of make sense for most android applications, but not for terminal interface.

I believe that "External keyboard helper" is able to reprogram key press events, but after some thinking I could not decide on which key to move "back" key, so I ended up leaving escape set as is
Go to the top of the page
 
+Quote Post
jankratochvil
post Dec 28 2019, 02:07 PM
Post #9





Group: Members
Posts: 8
Joined: 21-June 19
Member No.: 850,435



QUOTE(vldmr @ Dec 28 2019, 05:55 PM) *
I believe that "External keyboard helper" is able to reprogram key press events, but after some thinking I could not decide on which key to move "back" key, so I ended up leaving escape set as is


I have tried Keyboard/Button Mapper but it also cannot catch the Escape key - Escape key will ask whether to quit the buttons recording. So the only hope is Planet (as Planet does not opensource any of its software/drivers, right?).
Go to the top of the page
 
+Quote Post
shinkamui
post Dec 28 2019, 06:43 PM
Post #10





Group: Members
Posts: 49
Joined: 6-June 18
Member No.: 823,980



QUOTE(jankratochvil @ Dec 28 2019, 08:32 AM) *
QUOTE(vldmr @ Dec 26 2019, 11:33 PM) *
Btw, for escape works alt-space, in mc or vim.


OK, alt-escape does work for VIM, thanks. But still is there a way to make the physical Escape key working as a normal Escape key? I have already bugreported it to Planet as it looks to me as the Cosmo keyboard driver problem as vtshowkeys also cannot catch the Escape key (and it quits from Termux to laucher).


As a heavy termux user, i find escape working as escape very necessary on this device to really get the touch type workflow going, especially in vim. I solved this annoyance by editing termux.properties, and setting the back-key property to escape. This only fixes termux, enabling escape to function correctly in vim and other console apps, as well as no long annoyingly minimizing termux. outside of this escape as back is incredibly convenient in android.

hope this is useful for your needs as well.
Go to the top of the page
 
+Quote Post
jankratochvil
post Dec 28 2019, 11:42 PM
Post #11





Group: Members
Posts: 8
Joined: 21-June 19
Member No.: 850,435



QUOTE(shinkamui @ Dec 29 2019, 04:43 AM) *
I solved this annoyance by editing termux.properties, and setting the back-key property to escape.


Wow, it really works, thanks a lot! https://wiki.termux.com/wiki/Terminal_Settings
Go to the top of the page
 
+Quote Post
Dickon Hood
post Dec 31 2019, 03:54 AM
Post #12





Group: Members
Posts: 20
Joined: 7-December 19
From: Home
Member No.: 860,798



QUOTE(Charlie Stross @ Dec 27 2019, 04:49 PM) *
Alas, ctrl-\ is a bad choice for the Gemini/Cosmo layout (backslash is Fn-3, so it's a three-finger salute).


Alas, Ctrl-\ is a bad choice for any terminal program, as by default it sends a SIGQUIT which will coredump the running process. This gets awkward when you forget you're using something else and muscle-memory it...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th January 2020 - 01:57 PM