| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
- Disable ENABLE_PROCESSED_INPUT in raw mode. Otherwise ^C isn't
immediately detected during shell command line editing with
virtual terminal input enabled.
- Switch read_key()/unix_readkey() to windows_read_key()/read_key().
This allows the shell `read` builtin to use windows_read_key().
Without this change `read` fails when virtual terminal input is
enabled.
|
|
|
|
|
|
|
| |
Until now busybox-w32 has used a native Windows implementation
of read_key(). Build the upstream Unix implementation and use
it instead of the native version when virtual terminal input
mode is enabled.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify `struct termios` to support Windows virtual terminals.
Native console mode flags replace the Unix `c_?flag` structure
members. Remove unsupported flags from termios.h.
Add implementations of tcgetattr(3)/tcsetattr(3) to get/set console
flags when virtual terminal input mode is enabled.
Add support for emulating raw mode to get_termios_and_make_raw().
This (and related functions) are exposed but not yet used.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The WIN32 implementation of read_key() didn't reset errno to zero,
unlike the upstream version. This could result in invalid non-zero
errno values after calls to lineedit_read_key().
For example, after an attempt to run a non-existent command in the
shell errno is set to ENOENT. If the shell had vi line edit mode
enabled any command that reads an additional character (e.g. 'c' or
'd') would see the non-zero errno and report EOF.
(GitHub issue #283)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In read_keys():
- Identify all keys on the numeric pad used to enter character
codes. Otherwise Alt-Left/Alt-Right on the numeric pad are
treated as word movements in command line editing, preventing
the entry of character codes containing 4 or 6.
- Add modifier flag bits to the virtual keycodes we care about.
This means, for example, that only the unmodified Up/Down arrow
keys move through shell history, not Up/Down plus arbitrary
modifiers.
|
|
|
|
| |
No change in functionality. Saves 16 bytes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 7874ca73b (win32: allow characters to be entered as ALTNNN)
made it possible to enter characters using Alt and a character code
on the numeric pad. This required detecting the release of the
Alt key.
Sometimes this caused a problem when using Alt+Tab to cycle between
applications. If Alt was released before Tab the code passed a tab
character to the application.
Avoid such issues by looking specifically for the release of the Alt
key.
|
|
|
|
|
|
|
|
|
|
| |
This patch restores support for Bash-stle Alt commands present in the
original BusyBox:
* Alt-b, Alt-LeftArrow backward word
* Alt-f, Alt-RightArrow forward word
* Alt-BackSpace delete word backward
* Alt-d delete word forward
|
|
|
|
|
|
|
|
|
|
|
| |
When a path name is copied to a console application using drag and
drop the path separator is backslash. To handle this situation in
the shell add an editing command (Ctrl-Z) to convert all backslashes
on the current line to slashes.
See GitHub issue #149.
Also remove some unused code from read_key().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The euro currency symbol was added to some OEM code pages. See:
https://www.aivosto.com/articles/charsets-codepages-dos.html
Add a configuration option (enabled by default) to support this.
When enabled:
- The read_key() function requests wide character key events. This
allows the euro symbol to be entered regardless of the console OEM
code page, though it needs to be available in the ANSI code page.
- Conversions between OEM and ANSI code pages in winansi.c are
modified to work around a bug in the Microsoft routines.
- If the OEM code page is 850 when BusyBox starts it's changed to
858. This is the only currently supported OEM code page.
Also, the shell read builtin is modified to use read_key() whenever
input is being taken from the console.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It wasn't possible to enter characters using Alt and the decimal
character code. This was because the character is generated when
the Alt key is released but the WIN32 implementation of read_key()
ignored all key up events.
Modify read_key() to ignore numbers entered on the numeric keypad
with Alt pressed and to detect when Alt is released.
Fixes GitHub issue #136.
|
|
|
|
|
| |
The code to manipulate terminal settings serves no purpose in WIN32.
Use conditional compilation to exclude much of it.
|
|
|
|
|
|
| |
Move the wait for timeout into the while loop of read_key. Otherwise
the timeout won't be checked after any event that doesn't result in
a value being returned.
|
| |
|
|
|
|
|
|
| |
It seems that passing control characters through OemToCharBuff is
not a good idea: some of them end up in the top half of the
codepage.
|
|
|
|
|
|
|
|
|
|
| |
Windows console applications use different codepages for console I/O
and the rest of the API:
http://msdn.microsoft.com/en-us/goglobal/bb688114.aspx#E2F
Attempt to workaround this by converting characters when they're read from
and written to the console. Not all possible paths are handled.
|
| |
|
| |
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
will be needed by CONFIG_FEATURE_VI_ASK_TERMINAL
|
| |/
|/|
| |
| |
| |
| | |
This makes ^C and ^D work properly regarding ash input handling
(i.e. does not crash ash). Pressing ^C in ash does not stop running
programs though.
|
| | |
|
| |
| |
| |
| |
| | |
-1 to lineedit means error... when tty is destroyed... it would
terminate ash for some reasone
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|