[GH-ISSUE #240] Backslash not accepted in InputField #184

Closed
opened 2026-03-04 01:02:44 +03:00 by kerem · 4 comments
Owner

Originally created by @wolfsblu on GitHub (Feb 22, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/240

It seems the Inputfield does not allow backslashes (\). I've tried entering one directly, using Alt-keycodes or pasting it in, but to no avail. Is this intended?

Edit: Same goes for square and curly brackets.

Originally created by @wolfsblu on GitHub (Feb 22, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/240 It seems the Inputfield does not allow backslashes (`\`). I've tried entering one directly, using Alt-keycodes or pasting it in, but to no avail. Is this intended? Edit: Same goes for square and curly brackets.
kerem closed this issue 2026-03-04 01:02:44 +03:00
Author
Owner

@dguendisch commented on GitHub (Feb 22, 2019):

Works fine for me (backslash, curly braces, etc). Maybe you have an AcceptanceFunction defined like e.g. https://github.com/rivo/tview/blob/master/demos/inputfield/main.go#L15?

<!-- gh-comment-id:466399507 --> @dguendisch commented on GitHub (Feb 22, 2019): Works fine for me (backslash, curly braces, etc). Maybe you have an AcceptanceFunction defined like e.g. https://github.com/rivo/tview/blob/master/demos/inputfield/main.go#L15?
Author
Owner

@wolfsblu commented on GitHub (Feb 22, 2019):

I just checked it again, interestingly it works on Linux, but not on Windows.

<!-- gh-comment-id:466414607 --> @wolfsblu commented on GitHub (Feb 22, 2019): I just checked it again, interestingly it works on Linux, but not on Windows.
Author
Owner

@dguendisch commented on GitHub (Feb 22, 2019):

I'm on mac, so that seems to work as well.

<!-- gh-comment-id:466414896 --> @dguendisch commented on GitHub (Feb 22, 2019): I'm on mac, so that seems to work as well.
Author
Owner

@rivo commented on GitHub (Mar 24, 2019):

Sorry for taking so long. I needed access to a Windows machine to reproduce it.

I believe this is now fixed. The problem was with the Alt key which prevented characters from being processed. Probably only users with German keyboards would have noticed this since the backslash (but also square and curly brackets) require hitting the "AltGr" key.

Fun fact: "AltGr" stands for "alternate graphic" and we can thank IBM for making us awkwardly bend our fingers to enter such common characters as [, ], {, }, or \. (And it's even worse on Macs where those characters are not even printed on the keyboard. I pity the one-handed person who has to enter a backslash character on a German Mac keyboard.)

<!-- gh-comment-id:475986739 --> @rivo commented on GitHub (Mar 24, 2019): Sorry for taking so long. I needed access to a Windows machine to reproduce it. I believe this is now fixed. The problem was with the Alt key which prevented characters from being processed. Probably only users with German keyboards would have noticed this since the backslash (but also square and curly brackets) require hitting the "AltGr" key. Fun fact: "AltGr" stands for "alternate graphic" and we can thank IBM for making us awkwardly bend our fingers to enter such common characters as `[`, `]`, `{`, `}`, or `\`. (And it's even worse on Macs where those characters are not even printed on the keyboard. I pity the one-handed person who has to enter a backslash character on a German Mac keyboard.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#184
No description provided.