Bug#652990: screen: Cannot bind space to a different action
On Wed, Jan 11, 2012 at 07:00:52PM +0100, Axel Beckert wrote: I reported it to the GNU Screen developers at https://savannah.gnu.org/bugs/index.php?35287 I did some more thinking on this and I think I have a conclusion. First, my initial report was wrong --- typing fast does not trigger the default action --- it triggers the control-key action for the second key, e.g. ^A-space yields ^A-control(space), which also happens to be ^@, or the null byte. This probably happens because the control was down for the ^A, and might pass into the next key. Second, I notice that they map control(space) to the same action as space in the default bindings (which were not modified by Debian): ktab[' '].nr = ktab[Ctrl(' ')].nr = - ktab['n'].nr = ktab[Ctrl('n')].nr = RC_NEXT; Third, because the control-space (^@) is coming from the read() kernel call (and I don't see them remapping 'read' to their own function), I realized the problem might not be with screen but perhaps the terminal driver. However, I tried to reproduce the problem from the command line by typing ^A-space quickly and did not see that behavior. I then started to wonder why I had not see this behavior with screen on my previous BSD system so I booted it up, and found it has exactly the fix I just discovered, e.g. binding ^@ to the same action as space. So, I think I have a solution for my problem, and that is to map control-key to the same action as the non-control key. I see them doing that in several default screen bindings, and I will just follow that if I see another key exhibiting this problem. So, for me, I don't need to peruse this issue further, but am available if someone else needs help on this. Thanks for looking into this for me. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
On Wed, Jan 11, 2012 at 07:00:52PM +0100, Axel Beckert wrote: tag 652990 + confirmed upstream retitle 652990 screen: Binding a key to a different action sometimes still yields the default binding forwarded 652990 https://savannah.gnu.org/bugs/index.php?35287 kthxbye Hi Bruce, thanks for the reminder. Bruce Momjian wrote: I just found the cause of my odd Enter behavior and was about to email an update. It turns out if you press ^A, and then space quickly, you get the (wrong) 'next' behavior, but if press ^A then and then wait for a second and then press space, you get the (right) configured info behavior. [...] Is that reproducible for you? Indeed it is -- despite it happened in only about 10% of my tries to type ^A Space quickly. (Maybe I'm still not typing fast enough all the time. ;-) I'll check later if this still happens with the version of screen in Debian experimental. Any update on this? Yes, and I'm sorry to say that it still happens with the newest upstream version and does not only happen with space. I could also reproduce it with the key c instead. I reported it to the GNU Screen developers at https://savannah.gnu.org/bugs/index.php?35287 Having seen no activity on this, I decided to dig into the code in a serious way. I added some debug statements and put screen in debug mode and found that the read() call in disp_readev_fn() was returning ^@ (the null byte) for space when typed quickly. Here is my debug output: + hit ev fd 4 type 1! size = 4096 char = ^Z len = 1 disp_readev_fn 2 ProcessInput: 1 bytes cmp2 ^Z cmp ^Z ESC[3] complete miss ProcessInput2: 1 bytes - ilen now 1 bytes + hit ev fd 0 type 3! serv_select_fn called waiting for events: - fd 4 type 1 pri 0 - fd 4 type 2 pri 0 - fd 8 type 1 pri 0 - fd 8 type 2 pri 0 - fd 5 type 1 pri 0 - fd 0 type 3 pri -10 - cond ev fd 4 type 2 failed - cond ev fd 8 type 2 failed readfds: 4 5 8 writefds: + hit ev fd 4 type 1! size = 4096 -- char = ^@ len = 1 disp_readev_fn 2 ProcessInput: 1 bytes cmp2 ^@ cmp ^@ ESC[3] complete miss ProcessInput2: 1 bytes - ilen now 1 bytes AclCheckPermCmd(root 0 next) = 0 Now, read() returning a null byte for space is really odd, and I have no idea what would cause that. With that information, I decided to add this to my screenrc: # fix screen bug caused by typing fast, 'space' becomes null byte, 2012-01-16 bind ^@ other This does fix my immediate problem of meta-space not working. I suspect that other cases also might return a null byte, but I am not sure that is a problem for me. I am not clear now if the problem is that type fast causes the default action, or type fast causes 'next' because next is bound to the null byte. Let me know if you want my debug diff but I basically just output the byte the read() returned (assuming size 0). Hopefully this will give someone a place to continue debugging this. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
On Fri, Dec 23, 2011 at 04:31:27PM +0100, Axel Beckert wrote: tag 652990 - unreproducible moreinfo kthxbye Hi Bruce, thanks for the followup. Bruce Momjian wrote: I just found the cause of my odd Enter behavior and was about to email an update. It turns out if you press ^A, and then space quickly, you get the (wrong) 'next' behavior, but if press ^A then and then wait for a second and then press space, you get the (right) configured info behavior. [...] Is that reproducible for you? Indeed it is -- despite it happened in only about 10% of my tries to type ^A Space quickly. (Maybe I'm still not typing fast enough all the time. ;-) I'll check later if this still happens with the version of screen in Debian experimental. Any update on this? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
tag 652990 + confirmed upstream retitle 652990 screen: Binding a key to a different action sometimes still yields the default binding forwarded 652990 https://savannah.gnu.org/bugs/index.php?35287 kthxbye Hi Bruce, thanks for the reminder. Bruce Momjian wrote: I just found the cause of my odd Enter behavior and was about to email an update. It turns out if you press ^A, and then space quickly, you get the (wrong) 'next' behavior, but if press ^A then and then wait for a second and then press space, you get the (right) configured info behavior. [...] Is that reproducible for you? Indeed it is -- despite it happened in only about 10% of my tries to type ^A Space quickly. (Maybe I'm still not typing fast enough all the time. ;-) I'll check later if this still happens with the version of screen in Debian experimental. Any update on this? Yes, and I'm sorry to say that it still happens with the newest upstream version and does not only happen with space. I could also reproduce it with the key c instead. I reported it to the GNU Screen developers at https://savannah.gnu.org/bugs/index.php?35287 Regards, Axel -- ,''`. | Axel Beckert a...@debian.org, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `-| 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
tag 652990 + unreproducible moreinfo kthxbye Hi Bruce, Bruce Momjian,,, wrote: Package: screen Version: 4.0.3-14 Severity: normal I can cannot change the binding of the spacebar in screen. If you start screen with just this configuration file: bind ' ' info you will find that when you start screen, ^A-space will show the window info, but once you press Enter, ^A-space will do 'next screen' and never show info again. I'm sorry, but I can't reproduce this problem. I put bind ' ' info as sole line (with line break at the end) in a .screenrc, started screen, pressed ^A-Space, it worked fine. I then pressed Enter in the shell as well as ^A-Enter, but ^A-Space as well as ^A-Enter continue to show the one line window info. Nothing tries to switch to the next window, i.e. it works fine for me. I tested it on Squeeze amd64 as you seem to have experienced the issue on Squeeze amd64. Maybe there need some additional requirements to be met to run into this issue? Regards, Axel -- ,''`. | Axel Beckert a...@debian.org, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `-| 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
Axel Beckert wrote: tag 652990 + unreproducible moreinfo kthxbye Hi Bruce, Bruce Momjian,,, wrote: Package: screen Version: 4.0.3-14 Severity: normal I can cannot change the binding of the spacebar in screen. If you start screen with just this configuration file: bind ' ' info you will find that when you start screen, ^A-space will show the window info, but once you press Enter, ^A-space will do 'next screen' and never show info again. I'm sorry, but I can't reproduce this problem. I put bind ' ' info as sole line (with line break at the end) in a .screenrc, started screen, pressed ^A-Space, it worked fine. I then pressed Enter in the shell as well as ^A-Enter, but ^A-Space as well as ^A-Enter continue to show the one line window info. Nothing tries to switch to the next window, i.e. it works fine for me. I tested it on Squeeze amd64 as you seem to have experienced the issue on Squeeze amd64. Maybe there need some additional requirements to be met to run into this issue? I just found the cause of my odd Enter behavior and was about to email an update. It turns out if you press ^A, and then space quickly, you get the (wrong) 'next' behavior, but if press ^A then and then wait for a second and then press space, you get the (right) configured info behavior. I was able to reproduce this same problem with the 'f'/flow binding as well, so I think it might be more widespread than just the binding of the spacebar. Is that reproducible for you? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
tag 652990 - unreproducible moreinfo kthxbye Hi Bruce, thanks for the followup. Bruce Momjian wrote: I just found the cause of my odd Enter behavior and was about to email an update. It turns out if you press ^A, and then space quickly, you get the (wrong) 'next' behavior, but if press ^A then and then wait for a second and then press space, you get the (right) configured info behavior. [...] Is that reproducible for you? Indeed it is -- despite it happened in only about 10% of my tries to type ^A Space quickly. (Maybe I'm still not typing fast enough all the time. ;-) I'll check later if this still happens with the version of screen in Debian experimental. Regards, Axel -- ,''`. | Axel Beckert a...@debian.org, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `-| 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
Axel Beckert wrote: tag 652990 - unreproducible moreinfo kthxbye Hi Bruce, thanks for the followup. Bruce Momjian wrote: I just found the cause of my odd Enter behavior and was about to email an update. It turns out if you press ^A, and then space quickly, you get the (wrong) 'next' behavior, but if press ^A then and then wait for a second and then press space, you get the (right) configured info behavior. [...] Is that reproducible for you? Indeed it is -- despite it happened in only about 10% of my tries to type ^A Space quickly. (Maybe I'm still not typing fast enough all the time. ;-) Well, that is good to hear. I seem to type so fast that it took me two days realize slowing down made it work. ;-) I'll check later if this still happens with the version of screen in Debian experimental. Thanks. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652990: screen: Cannot bind space to a different action
Package: screen Version: 4.0.3-14 Severity: normal I can cannot change the binding of the spacebar in screen. If you start screen with just this configuration file: bind ' ' info you will find that when you start screen, ^A-space will show the window info, but once you press Enter, ^A-space will do 'next screen' and never show info again. This is true even though ^A-? shows space as bound to 'info': infosp i I used 'info' as an example, but there is no action that can be properly bound to space, e.g. 'other'. This worked in older versions of screen. -- System Information: Debian Release: 6.0.3 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/16 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages screen depends on: ii dpkg 1.15.8.11 Debian package management system ii install-info 4.13a.dfsg.1-6 Manage installed documentation in ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libncursesw5 5.7+20100313-5 shared libraries for terminal hand ii libpam0g 1.1.1-6.1 Pluggable Authentication Modules l screen recommends no packages. screen suggests no packages. -- Configuration Files: /etc/screenrc changed: deflogin on vbell on defscrollback 1024 bind ^k bind ^\ bind \\ quit bind K kill bind I login on bind O login off bind } history termcapinfo vt100 dl=5\E[M hardstatus off termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 hardstatus string %h%? users: %u%? termcapinfo xterm*|linux*|rxvt*|Eterm* OP termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' defnonblock 5 escape ^zZ bind f bind ^z next bind ' ' info bind - prev bind p screen /letc/hardcopyprint bind x bind ^x bind L reset hardcopy_append on vbell_msg Wuff screen -t login 0 /bin/bash screen -t startup 9 /letc/multi_save -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org