summaryrefslogtreecommitdiff
path: root/win32/termios.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lineedit: add a command to change backslashes to slashesRon Yorston2019-03-151-6/+0
| | | | | | | | | | | 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().
* win32: add support for the euro currency symbolRon Yorston2019-02-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | 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.
* win32: allow characters to be entered as ALTNNNRon Yorston2019-01-261-3/+34
| | | | | | | | | | | | 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.
* win32: exclude termios codeRon Yorston2018-04-051-10/+0
| | | | | The code to manipulate terminal settings serves no purpose in WIN32. Use conditional compilation to exclude much of it.
* win32: ensure timeout works in read_keyRon Yorston2018-04-051-4/+4
| | | | | | 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.
* mingw: remove unused code from read_keyRon Yorston2015-04-221-5/+0
|
* Only change codepage of input character if top bit is setRon Yorston2014-03-241-2/+4
| | | | | | 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.
* Use OEM codepage for console I/ORon Yorston2014-03-191-0/+3
| | | | | | | | | | 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.
* Fix some compiler warningsRon Yorston2014-03-131-1/+1
|
* Always reset console mode when returning keyRon Yorston2012-02-161-16/+24
|
* Merge branch 'vi'Nguyễn Thái Ngọc Duy2010-09-221-1/+5
|\
| * Merge branch 'lineedit' into viNguyễn Thái Ngọc Duy2010-09-141-8/+37
| |\
| * | win32: read_key: implement timeoutNguyễn Thái Ngọc Duy2010-09-141-1/+5
| | | | | | | | | | | | will be needed by CONFIG_FEATURE_VI_ASK_TERMINAL
* | | win32: lineedit: make read_key() pass Ctrl+<letter> to read_line_inputNguyễn Thái Ngọc Duy2010-09-221-0/+6
| |/ |/| | | | | | | | | 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.
* | win32: read_key: add Page Up/Down and InsertNguyễn Thái Ngọc Duy2010-09-141-0/+3
| |
* | win32: read_key: do not return -1 on unknown keyNguyễn Thái Ngọc Duy2010-09-141-2/+0
| | | | | | | | | | -1 to lineedit means error... when tty is destroyed... it would terminate ash for some reasone
* | win32: read_key: support DeleteNguyễn Thái Ngọc Duy2010-09-141-0/+1
| |
* | win32: read_key: support Ctrl-{Left,Right}Nguyễn Thái Ngọc Duy2010-09-141-2/+9
| |
* | win32: read_key: imap some movement keys to KEYCODE_*Nguyễn Thái Ngọc Duy2010-09-141-1/+17
| |
* | win32: read_key: reset console state after readingNguyễn Thái Ngọc Duy2010-09-141-8/+12
|/
* win32: reimplement read_key() to read Windows consoleNguyễn Thái Ngọc Duy2010-09-141-1/+26
|
* win32: add termios stub so that it buildsNguyễn Thái Ngọc Duy2010-09-101-0/+11