Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift-Tab on Console #8

Open
3 tasks done
oukemi opened this issue Jul 3, 2024 · 6 comments
Open
3 tasks done

Shift-Tab on Console #8

oukemi opened this issue Jul 3, 2024 · 6 comments
Labels

Comments

@oukemi
Copy link

oukemi commented Jul 3, 2024

Prerequisites

  • I've checked the existing issues and I'm not duplicating a report.
  • I've checked the zimfw Changelog and I'm not being affected by documented changes.
  • I've checked the zimfw 📢 Announcements and I'm not being affected by announced changes.

Bug description

Shift-Tab works in terminal emulators but not on linux console

Steps to reproduce

  1. cd ${$(mktemp -d):A} && \
        ZDOTDIR=${PWD} HOME=${PWD} ZIM_HOME=${PWD}/.zim && \
        curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh && \
        exec zsh
    
  2. Add more steps here ...

Current behavior

Shift-Tab works in terminal emulators but not on linux console

Expected behavior

Shift-Tab works in terminal emulators but not on linux console

zimfw info

No response

Additional context

No response

@oukemi oukemi added the bug label Jul 3, 2024
@ericbn
Copy link
Member

ericbn commented Nov 8, 2024

What do you get when you type cat<ENTER><SHIFT-TAB> in your shell prompt? (You can exit cat with <CONTROL-C>.) I get:

% cat
^[[Z

Then what do you get as output of print -n ${terminfo[kcbt]} | xxd? I get:

% print -n ${terminfo[kcbt]} | xxd
00000000: 1b5b 5a                                  .[Z

Both should match, as they do above.

@oukemi
Copy link
Author

oukemi commented Nov 11, 2024

Terminal :

cat                                                                                                                                                                                                                                                                                       
^[[Z
print -n ${key_info[kcbt]} | xxd                                                                                                                                                                                                                                                           
00000000: 1b5b 5a                                  .[Z

Console:

cat
^[
print -n ${key_info[kcbt]} | xxd                                                                                                                                                                                                                                                           
00000000: 1b09                                  ''

@ericbn
Copy link
Member

ericbn commented Nov 11, 2024

@oukemi hard to see the output of cat in the console. Please try cat | xxd<ENTER><SHIFT-TAB><ENTER><CTRL-D>

I get in my terminal:

% cat | xxd
^[[Z
00000000: 1b5b 5a0a                                .[Z.

(0a in the end is the line feed, which we ignore)

@ericbn
Copy link
Member

ericbn commented Nov 11, 2024

Also, please note that this module will not be initialized if [[ ${TERM} == dumb ]]

@oukemi
Copy link
Author

oukemi commented Nov 12, 2024

piped cat through xxd and still the same; on console I get :

cat | xxd
^[
echo $TERM
linux

@ericbn
Copy link
Member

ericbn commented Nov 12, 2024

@oukemi end the cat input with <ENTER><CTRL-D> (that's D instead of C) instead of <CTRL-C>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants