Switch to dep
This commit is contained in:
13
vendor/maunium.net/go/tcell/.appveyor.yml
generated
vendored
Normal file
13
vendor/maunium.net/go/tcell/.appveyor.yml
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
version: 1.0.{build}
|
||||
clone_folder: c:\gopath\src\github.com\gdamore\tcell
|
||||
environment:
|
||||
GOPATH: c:\gopath
|
||||
build_script:
|
||||
- go version
|
||||
- go env
|
||||
- SET PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;%PATH%
|
||||
- go get -t ./...
|
||||
- go build
|
||||
- go install ./...
|
||||
test_script:
|
||||
- go test ./...
|
1
vendor/maunium.net/go/tcell/.gitignore
generated
vendored
Normal file
1
vendor/maunium.net/go/tcell/.gitignore
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
coverage.txt
|
19
vendor/maunium.net/go/tcell/.travis.yml
generated
vendored
Normal file
19
vendor/maunium.net/go/tcell/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.5.x
|
||||
- 1.6.x
|
||||
- 1.7.x
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
- 1.10.x
|
||||
- master
|
||||
|
||||
before_install:
|
||||
- go get -t -v ./...
|
||||
|
||||
script:
|
||||
- go test -race -coverprofile=coverage.txt -covermode=atomic
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
5
vendor/maunium.net/go/tcell/AUTHORS
generated
vendored
Normal file
5
vendor/maunium.net/go/tcell/AUTHORS
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
Garrett D'Amore <garrett@damore.org>
|
||||
Zachary Yedidia <zyedidia@gmail.com>
|
||||
Junegunn Choi <junegunn.c@gmail.com>
|
||||
Staysail Systems, Inc. <info@staysail.tech>
|
||||
Collin Warren <anatoly@somethinghub.com>
|
202
vendor/maunium.net/go/tcell/LICENSE
generated
vendored
Normal file
202
vendor/maunium.net/go/tcell/LICENSE
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
254
vendor/maunium.net/go/tcell/README.md
generated
vendored
Normal file
254
vendor/maunium.net/go/tcell/README.md
generated
vendored
Normal file
@ -0,0 +1,254 @@
|
||||
## tcell <img src=tcell.png align=right>
|
||||
This is a fork of [tcell](https://github.com/gdamore/tcell) with the patches from [zyedidia](https://github.com/zyedidia/tcell).
|
||||
|
||||
[](https://travis-ci.org/gdamore/tcell)
|
||||
[](https://ci.appveyor.com/project/gdamore/tcell)
|
||||
[](https://github.com/gdamore/tcell/blob/master/LICENSE)
|
||||
[](https://gitter.im/gdamore/tcell)
|
||||
[](https://godoc.org/github.com/gdamore/tcell)
|
||||
[](http://goreportcard.com/report/gdamore/tcell)
|
||||
[](https://codecov.io/gh/gdamore/tcell)
|
||||
|
||||
|
||||
Package tcell provides a cell based view for text terminals, like xterm.
|
||||
It was inspired by termbox, but differs from termbox in some important
|
||||
ways. It also adds substantial functionality beyond termbox.
|
||||
|
||||
## Examples
|
||||
|
||||
* [proxima5](https://github.com/gdamore/proxima5) - space shooter ([video](https://youtu.be/jNxKTCmY_bQ))
|
||||
* [govisor](https://github.com/gdamore/govisor) - service management UI ([screenshot](http://2.bp.blogspot.com/--OsvnfzSNow/Vf7aqMw3zXI/AAAAAAAAARo/uOMtOvw4Sbg/s1600/Screen%2BShot%2B2015-09-20%2Bat%2B9.08.41%2BAM.png))
|
||||
* mouse demo - [screenshot](http://2.bp.blogspot.com/-fWvW5opT0es/VhIdItdKqJI/AAAAAAAAATE/7Ojc0L1SpB0/s1600/Screen%2BShot%2B2015-10-04%2Bat%2B11.47.13%2BPM.png) - included mouse test
|
||||
* [gomatrix](https://github.com/gdamore/gomatrix) - converted from Termbox
|
||||
* [micro](https://github.com/zyedidia/micro/) - lightweight text editor with syntax-highlighting and themes
|
||||
* [godu](https://github.com/viktomas/godu) - simple golang utility helping to discover large files/folders.
|
||||
* [tview](https://github.com/rivo/tview) - rich interactive widgets for terminal UIs
|
||||
* [tui-go](https://github.com/marcusolsson/tui-go) - UI library for terminal apps
|
||||
* [gomandelbrot](https://github.com/rgm3/gomandelbrot) - Mandelbrot!
|
||||
|
||||
## Pure Go Terminfo Database
|
||||
|
||||
First, it includes a full parser and expander for terminfo capability strings,
|
||||
so that it can avoid hard coding escape strings for formatting. It also favors
|
||||
portability, and includes support for all POSIX systems.
|
||||
|
||||
The database is also flexible & extensible, and can modified by either running
|
||||
a program to build the entire database, or an entry for just a single terminal.
|
||||
|
||||
## More Portable
|
||||
|
||||
Tcell is portable to a wider variety of systems. Tcell is believed
|
||||
to work with all of the systems officially supported by golang with
|
||||
the exception of nacl (which lacks any kind of a terminal interface).
|
||||
(Plan9 is not supported by Tcell, but it is experimental status only
|
||||
in golang.) For all of these systems *except Solaris/illumos*, Tcell
|
||||
is pure Go, with no need for CGO.
|
||||
|
||||
## No Async IO
|
||||
|
||||
Tcell is able to operate without requiring SIGIO signals (unlike Termbox),
|
||||
or asynchronous I/O, and can instead use standard Go file
|
||||
objects and Go routines. This means it should be safe, especially for
|
||||
use with programs that use exec, or otherwise need to manipulate the
|
||||
tty streams. This model is also much closer to idiomatic Go, leading
|
||||
to fewer surprises.
|
||||
|
||||
## Richer Unicode & non-Unicode support
|
||||
|
||||
Tcell includes enhanced support for Unicode, including wide characters and
|
||||
combining characters, provided your terminal can support them. Note that
|
||||
Windows terminals generally don't support the full Unicode repertoire.
|
||||
|
||||
It will also convert to and from Unicode locales, so that the program
|
||||
can work with UTF-8 internally, and get reasonable output in other locales.
|
||||
We try hard to convert to native characters on both input and output, and
|
||||
on output Tcell even makes use of the alternate character set to facilitate
|
||||
drawing certain characters.
|
||||
|
||||
## More Function Keys
|
||||
|
||||
It also has richer support for a larger number of special keys that some
|
||||
terminals can send.
|
||||
|
||||
## Better Color Handling
|
||||
|
||||
Tcell will respect your terminal's color space as specified within your terminfo
|
||||
entries, so that for example attempts to emit color sequences on VT100 terminals
|
||||
won't result in unintended consequences.
|
||||
|
||||
In Windows mode, Tcell supports 16 colors, bold, dim, and reverse,
|
||||
instead of just termbox's 8 colors with reverse. (Note that there is some
|
||||
conflation with bold/dim and colors.)
|
||||
|
||||
Tcell maps 16 colors down to 8, for terminals that need it. (The upper
|
||||
8 colors are just brighter versions of the lower 8.)
|
||||
|
||||
## Better Mouse Support
|
||||
|
||||
Tcell supports enhanced mouse tracking mode, so your application can receive
|
||||
regular mouse motion events, and wheel events, if your terminal supports it.
|
||||
|
||||
## Termbox Compatibility
|
||||
|
||||
A compatibility layer for termbox is provided in the compat
|
||||
directory. To use it, try importing "maunium.net/go/tcell/termbox"
|
||||
instead. Most termbox-go programs will probably work without further
|
||||
modification.
|
||||
|
||||
## Working With Unicode
|
||||
|
||||
Internally Tcell uses UTF-8, just like Go. However, Tcell understands how to
|
||||
convert to and from other character sets, using the capabilities of
|
||||
the golang.org/x/text/encoding packages. Your application must supply
|
||||
them, as the full set of the most common ones bloats the program by about
|
||||
2MB. If you're lazy, and want them all anyway, see the encoding
|
||||
sub-directory.
|
||||
|
||||
## Wide & Combining Characters
|
||||
|
||||
The SetContent() API takes a primary rune, and an optional list of combining
|
||||
runes. If any of the runes is a wide (East Asian) rune occupying two cells,
|
||||
then the library will skip output from the following cell, but care must be
|
||||
taken in the application to avoid explicitly attempting to set content in the
|
||||
next cell, otherwise the results are undefined. (Normally wide character
|
||||
is displayed, and the other character is not; do not depend on that behavior.)
|
||||
|
||||
Experience has shown that the vanilla Windows 8 console application does not
|
||||
support any of these characters properly, but at least some options like
|
||||
ConEmu do support Wide characters at least.
|
||||
|
||||
## Colors
|
||||
|
||||
Tcell assumes the ANSI/XTerm color model, including the 256 color map that
|
||||
XTerm uses when it supports 256 colors. The terminfo guidance will be
|
||||
honored, with respect to the number of colors supported. Also, only
|
||||
terminals which expose ANSI style setaf and setab will support color;
|
||||
if you have a color terminal that only has setf and setb, please let me
|
||||
know; it wouldn't be hard to add that if there is need.
|
||||
|
||||
## 24-bit Color
|
||||
|
||||
Tcell _supports true color_! (That is, if your terminal can support it,
|
||||
Tcell can accurately display 24-bit color.)
|
||||
|
||||
To use 24-bit color, you need to use a terminal that supports it. Modern
|
||||
xterm and similar teminal emulators can support this. As terminfo lacks any
|
||||
way to describe this capability, we fabricate the capability for
|
||||
terminals with names ending in *-truecolor. The stock distribution ships
|
||||
with a database that defines xterm-truecolor. To try it out, set your
|
||||
TERM variable to xterm-truecolor.
|
||||
|
||||
When using TrueColor, programs will display the colors that the programmer
|
||||
intended, overriding any "themes" you may have set in your terminal
|
||||
emulator. (For some cases, accurate color fidelity is more important
|
||||
than respecting themes. For other cases, such as typical text apps that
|
||||
only use a few colors, its more desirable to respect the themes that
|
||||
the user has established.)
|
||||
|
||||
If you find this undesirable, you can either use a TERM variable
|
||||
that lacks the TRUECOLOR setting, or set TCELL_TRUECOLOR=disable in your
|
||||
environment.
|
||||
|
||||
## Performance
|
||||
|
||||
Reasonable attempts have been made to minimize sending data to terminals,
|
||||
avoiding repeated sequences or drawing the same cell on refresh updates.
|
||||
|
||||
## Terminfo
|
||||
|
||||
(Not relevent for Windows users.)
|
||||
|
||||
The Terminfo implementation operates with two forms of database. The first
|
||||
is the built-in go database, which contains a number of real database entries
|
||||
that are compiled into the program directly. This should minimize calling
|
||||
out to database file searches.
|
||||
|
||||
The second is in the form of JSON files, that contain the same information,
|
||||
which can be located either by the $TCELLDB environment file, $HOME/.tcelldb,
|
||||
or is located in the Go source directory as database.json.
|
||||
|
||||
These files (both the Go and the JSON files) can be generated using the
|
||||
mkinfo.go program. If you need to regnerate the entire set for some reason,
|
||||
run the mkdatabase.sh file. The generation uses the infocmp(1) program on
|
||||
the system to collect the necessary information.
|
||||
|
||||
The mkinfo.go program can also be used to generate specific database entries
|
||||
for named terminals, in case your favorite terminal is missing. (If you
|
||||
find that this is the case, please let me know and I'll try to add it!)
|
||||
|
||||
Tcell requires that the terminal support the 'cup' mode of cursor addressing.
|
||||
Terminals without absolute cursor addressability are not supported.
|
||||
This is unlikely to be a problem; such terminals have not been mass produced
|
||||
since the early 1970s.
|
||||
|
||||
## Mouse Support
|
||||
|
||||
Mouse support is detected via the "kmous" terminfo variable, however,
|
||||
enablement/disablement and decoding mouse events is done using hard coded
|
||||
sequences based on the XTerm X11 model. As of this writing all popular
|
||||
terminals with mouse tracking support this model. (Full terminfo support
|
||||
is not possible as terminfo sequences are not defined.)
|
||||
|
||||
On Windows, the mouse works normally.
|
||||
|
||||
Mouse wheel buttons on various terminals are known to work, but the support
|
||||
in terminal emulators, as well as support for various buttons and
|
||||
live mouse tracking, varies widely. As a particular datum, MacOS X Terminal
|
||||
does not support Mouse events at all (as of MacOS 10.10, aka Yosemite.) The
|
||||
excellent iTerm application is fully supported, as is vanilla XTerm.
|
||||
|
||||
Mouse tracking with live tracking also varies widely. Current XTerm
|
||||
implementations, as well as current Screen and iTerm2, and Windows
|
||||
consoles, all support this quite nicely. On other platforms you might
|
||||
find that only mouse click and release events are reported, with
|
||||
no intervening motion events. It really depends on your terminal.
|
||||
|
||||
## Testablity
|
||||
|
||||
There is a SimulationScreen, that can be used to simulate a real screen
|
||||
for automated testing. The supplied tests do this. The simulation contains
|
||||
event delivery, screen resizing support, and capabilities to inject events
|
||||
and examine "physical" screen contents.
|
||||
|
||||
## Platforms
|
||||
|
||||
### POSIX (Linux, FreeBSD, MacOS, Solaris, etc.)
|
||||
|
||||
For mainstream systems with a suitably well defined system call interface
|
||||
to tty settings, everything works using pure Go.
|
||||
|
||||
For the remainder (right now means only Solaris/illumos) we use POSIX function
|
||||
calls to manage termios, which implies that CGO is required on those platforms.
|
||||
|
||||
### Windows
|
||||
|
||||
Windows console mode applications are supported. Unfortunately mintty
|
||||
and other cygwin style applications are not supported.
|
||||
|
||||
Modern console applications like ConEmu, as well as the Windows 10
|
||||
console itself, support all the good features (resize, mouse tracking, etc.)
|
||||
|
||||
I haven't figured out how to cleanly resolve the dichotomy between cygwin
|
||||
style termios and the Windows Console API; it seems that perhaps nobody else
|
||||
has either. If anyone has suggestions, let me know! Really, if you're
|
||||
using a Windows application, you should use the native Windows console or a
|
||||
fully compatible console implementation.
|
||||
|
||||
### Plan9 and Native Client (Nacl)
|
||||
|
||||
The nacl and plan9 platforms won't work, but compilation stubs are supplied
|
||||
for folks that want to include parts of this in software targetting those
|
||||
platforms. The Simulation screen works, but as Tcell doesn't know how to
|
||||
allocate a real screen object on those platforms, NewScreen() will fail.
|
||||
|
||||
If anyone has wisdom about how to improve support for either of these,
|
||||
please let me know. PRs are especially welcome.
|
||||
|
||||
### Commercial Support
|
||||
|
||||
This software is absolutely free, but if you want to obtain commercial
|
||||
support (giving prioritized access to the developer, etc. on an hourly
|
||||
rate), please drop a line to info@staysail.tech
|
||||
|
||||
I also welcome donations at Patreon, if you just want to feel good about
|
||||
defraying development costs: https://www.patreon.com/gedamore
|
34
vendor/maunium.net/go/tcell/attr.go
generated
vendored
Normal file
34
vendor/maunium.net/go/tcell/attr.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// AttrMask represents a mask of text attributes, apart from color.
|
||||
// Note that support for attributes may vary widely across terminals.
|
||||
type AttrMask uint
|
||||
|
||||
// Attributes are not colors, but affect the display of text. They can
|
||||
// be combined.
|
||||
const (
|
||||
AttrBold AttrMask = 1 << (25 + iota)
|
||||
AttrBlink
|
||||
AttrReverse
|
||||
AttrUnderline
|
||||
AttrDim
|
||||
AttrItalic
|
||||
AttrStrikethrough
|
||||
AttrNone AttrMask = 0 // Just normal text.
|
||||
)
|
||||
|
||||
const attrAll = AttrBold | AttrBlink | AttrReverse | AttrUnderline | AttrDim | AttrItalic | AttrStrikethrough
|
186
vendor/maunium.net/go/tcell/cell.go
generated
vendored
Normal file
186
vendor/maunium.net/go/tcell/cell.go
generated
vendored
Normal file
@ -0,0 +1,186 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
type cell struct {
|
||||
currMain rune
|
||||
currComb []rune
|
||||
currStyle Style
|
||||
lastMain rune
|
||||
lastStyle Style
|
||||
lastComb []rune
|
||||
width int
|
||||
}
|
||||
|
||||
// CellBuffer represents a two dimensional array of character cells.
|
||||
// This is primarily intended for use by Screen implementors; it
|
||||
// contains much of the common code they need. To create one, just
|
||||
// declare a variable of its type; no explicit initialization is necessary.
|
||||
//
|
||||
// CellBuffer is not thread safe.
|
||||
type CellBuffer struct {
|
||||
w int
|
||||
h int
|
||||
cells []cell
|
||||
}
|
||||
|
||||
// SetContent sets the contents (primary rune, combining runes,
|
||||
// and style) for a cell at a given location.
|
||||
func (cb *CellBuffer) SetContent(x int, y int,
|
||||
mainc rune, combc []rune, style Style) {
|
||||
|
||||
if x >= 0 && y >= 0 && x < cb.w && y < cb.h {
|
||||
c := &cb.cells[(y*cb.w)+x]
|
||||
|
||||
i := 0
|
||||
for i < len(combc) {
|
||||
r := combc[i]
|
||||
if runewidth.RuneWidth(r) != 0 {
|
||||
// not a combining character, yank it
|
||||
combc = append(combc[:i-1], combc[i+1:]...)
|
||||
continue
|
||||
}
|
||||
i++
|
||||
}
|
||||
|
||||
if c.currMain != mainc {
|
||||
c.width = runewidth.RuneWidth(mainc)
|
||||
}
|
||||
c.currMain = mainc
|
||||
c.currComb = combc
|
||||
c.currStyle = style
|
||||
}
|
||||
}
|
||||
|
||||
// GetContent returns the contents of a character cell, including the
|
||||
// primary rune, any combining character runes (which will usually be
|
||||
// nil), the style, and the display width in cells. (The width can be
|
||||
// either 1, normally, or 2 for East Asian full-width characters.)
|
||||
func (cb *CellBuffer) GetContent(x, y int) (rune, []rune, Style, int) {
|
||||
var mainc rune
|
||||
var combc []rune
|
||||
var style Style
|
||||
var width int
|
||||
if x >= 0 && y >= 0 && x < cb.w && y < cb.h {
|
||||
c := &cb.cells[(y*cb.w)+x]
|
||||
mainc, combc, style = c.currMain, c.currComb, c.currStyle
|
||||
if width = c.width; width == 0 || mainc < ' ' {
|
||||
width = 1
|
||||
mainc = ' '
|
||||
}
|
||||
}
|
||||
return mainc, combc, style, width
|
||||
}
|
||||
|
||||
// Size returns the (width, height) in cells of the buffer.
|
||||
func (cb *CellBuffer) Size() (int, int) {
|
||||
return cb.w, cb.h
|
||||
}
|
||||
|
||||
// Invalidate marks all characters within the buffer as dirty.
|
||||
func (cb *CellBuffer) Invalidate() {
|
||||
for i := range cb.cells {
|
||||
cb.cells[i].lastMain = rune(0)
|
||||
}
|
||||
}
|
||||
|
||||
// Dirty checks if a character at the given location needs an
|
||||
// to be refreshed on the physical display. This returns true
|
||||
// if the cell content is different since the last time it was
|
||||
// marked clean.
|
||||
func (cb *CellBuffer) Dirty(x, y int) bool {
|
||||
if x >= 0 && y >= 0 && x < cb.w && y < cb.h {
|
||||
c := &cb.cells[(y*cb.w)+x]
|
||||
if c.lastMain == rune(0) {
|
||||
return true
|
||||
}
|
||||
if c.lastMain != c.currMain {
|
||||
return true
|
||||
}
|
||||
if c.lastStyle != c.currStyle {
|
||||
return true
|
||||
}
|
||||
if len(c.lastComb) != len(c.currComb) {
|
||||
return true
|
||||
}
|
||||
for i := range c.lastComb {
|
||||
if c.lastComb[i] != c.currComb[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDirty is normally used to indicate that a cell has
|
||||
// been displayed (in which case dirty is false), or to manually
|
||||
// force a cell to be marked dirty.
|
||||
func (cb *CellBuffer) SetDirty(x, y int, dirty bool) {
|
||||
if x >= 0 && y >= 0 && x < cb.w && y < cb.h {
|
||||
c := &cb.cells[(y*cb.w)+x]
|
||||
if dirty {
|
||||
c.lastMain = rune(0)
|
||||
} else {
|
||||
if c.currMain == rune(0) {
|
||||
c.currMain = ' '
|
||||
}
|
||||
c.lastMain = c.currMain
|
||||
c.lastComb = c.currComb
|
||||
c.lastStyle = c.currStyle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Resize is used to resize the cells array, with different dimensions,
|
||||
// while preserving the original contents. The cells will be invalidated
|
||||
// so that they can be redrawn.
|
||||
func (cb *CellBuffer) Resize(w, h int) {
|
||||
|
||||
if cb.h == h && cb.w == w {
|
||||
return
|
||||
}
|
||||
|
||||
newc := make([]cell, w*h)
|
||||
for y := 0; y < h && y < cb.h; y++ {
|
||||
for x := 0; x < w && x < cb.w; x++ {
|
||||
oc := &cb.cells[(y*cb.w)+x]
|
||||
nc := &newc[(y*w)+x]
|
||||
nc.currMain = oc.currMain
|
||||
nc.currComb = oc.currComb
|
||||
nc.currStyle = oc.currStyle
|
||||
nc.width = oc.width
|
||||
nc.lastMain = rune(0)
|
||||
}
|
||||
}
|
||||
cb.cells = newc
|
||||
cb.h = h
|
||||
cb.w = w
|
||||
}
|
||||
|
||||
// Fill fills the entire cell buffer array with the specified character
|
||||
// and style. Normally choose ' ' to clear the screen. This API doesn't
|
||||
// support combining characters.
|
||||
func (cb *CellBuffer) Fill(r rune, style Style) {
|
||||
for i := range cb.cells {
|
||||
c := &cb.cells[i]
|
||||
c.currMain = r
|
||||
c.currComb = nil
|
||||
c.currStyle = style
|
||||
}
|
||||
}
|
21
vendor/maunium.net/go/tcell/charset_stub.go
generated
vendored
Normal file
21
vendor/maunium.net/go/tcell/charset_stub.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// +build plan9 nacl
|
||||
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
func getCharset() string {
|
||||
return ""
|
||||
}
|
49
vendor/maunium.net/go/tcell/charset_unix.go
generated
vendored
Normal file
49
vendor/maunium.net/go/tcell/charset_unix.go
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
// Copyright 2016 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func getCharset() string {
|
||||
// Determine the character set. This can help us later.
|
||||
// Per POSIX, we search for LC_ALL first, then LC_CTYPE, and
|
||||
// finally LANG. First one set wins.
|
||||
locale := ""
|
||||
if locale = os.Getenv("LC_ALL"); locale == "" {
|
||||
if locale = os.Getenv("LC_CTYPE"); locale == "" {
|
||||
locale = os.Getenv("LANG")
|
||||
}
|
||||
}
|
||||
if locale == "POSIX" || locale == "C" {
|
||||
return "US-ASCII"
|
||||
}
|
||||
if i := strings.IndexRune(locale, '@'); i >= 0 {
|
||||
locale = locale[:i]
|
||||
}
|
||||
if i := strings.IndexRune(locale, '.'); i >= 0 {
|
||||
locale = locale[i+1:]
|
||||
} else {
|
||||
// Default assumption, and on Linux we can see LC_ALL
|
||||
// without a character set, which we assume implies UTF-8.
|
||||
return "UTF-8"
|
||||
}
|
||||
// XXX: add support for aliases
|
||||
return locale
|
||||
}
|
21
vendor/maunium.net/go/tcell/charset_windows.go
generated
vendored
Normal file
21
vendor/maunium.net/go/tcell/charset_windows.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// +build windows
|
||||
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
func getCharset() string {
|
||||
return "UTF-16"
|
||||
}
|
1019
vendor/maunium.net/go/tcell/color.go
generated
vendored
Normal file
1019
vendor/maunium.net/go/tcell/color.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
52
vendor/maunium.net/go/tcell/colorfit.go
generated
vendored
Normal file
52
vendor/maunium.net/go/tcell/colorfit.go
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Copyright 2016 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"github.com/lucasb-eyer/go-colorful"
|
||||
"math"
|
||||
)
|
||||
|
||||
// FindColor attempts to find a given color, or the best match possible for it,
|
||||
// from the palette given. This is an expensive operation, so results should
|
||||
// be cached by the caller.
|
||||
func FindColor(c Color, palette []Color) Color {
|
||||
match := ColorDefault
|
||||
dist := float64(0)
|
||||
r, g, b := c.RGB()
|
||||
c1 := colorful.Color{
|
||||
R: float64(r) / 255.0,
|
||||
G: float64(g) / 255.0,
|
||||
B: float64(b) / 255.0,
|
||||
}
|
||||
for _, d := range palette {
|
||||
r, g, b = d.RGB()
|
||||
c2 := colorful.Color{
|
||||
R: float64(r) / 255.0,
|
||||
G: float64(g) / 255.0,
|
||||
B: float64(b) / 255.0,
|
||||
}
|
||||
// CIE94 is more accurate, but really really expensive.
|
||||
nd := c1.DistanceCIE76(c2)
|
||||
if math.IsNaN(nd) {
|
||||
nd = math.Inf(1)
|
||||
}
|
||||
if match == ColorDefault || nd < dist {
|
||||
match = d
|
||||
dist = nd
|
||||
}
|
||||
}
|
||||
return match
|
||||
}
|
23
vendor/maunium.net/go/tcell/console_stub.go
generated
vendored
Normal file
23
vendor/maunium.net/go/tcell/console_stub.go
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
// +build !windows
|
||||
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// NewConsoleScreen returns a console based screen. This platform
|
||||
// doesn't have support for any, so it returns nil and a suitable error.
|
||||
func NewConsoleScreen() (Screen, error) {
|
||||
return nil, ErrNoScreen
|
||||
}
|
1030
vendor/maunium.net/go/tcell/console_win.go
generated
vendored
Normal file
1030
vendor/maunium.net/go/tcell/console_win.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1351
vendor/maunium.net/go/tcell/database.json
generated
vendored
Normal file
1351
vendor/maunium.net/go/tcell/database.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
vendor/maunium.net/go/tcell/doc.go
generated
vendored
Normal file
48
vendor/maunium.net/go/tcell/doc.go
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
// Copyright 2018 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package tcell provides a lower-level, portable API for building
|
||||
// programs that interact with terminals or consoles. It works with
|
||||
// both common (and many uncommon!) terminals or terminal emulators,
|
||||
// and Windows console implementations.
|
||||
//
|
||||
// It provides support for up to 256 colors, text attributes, and box drawing
|
||||
// elements. A database of terminals built from a real terminfo database
|
||||
// is provided, along with code to generate new database entries.
|
||||
//
|
||||
// Tcell offers very rich support for mice, dependent upon the terminal
|
||||
// of course. (Windows, XTerm, and iTerm 2 are known to work very well.)
|
||||
//
|
||||
// If the environment is not Unicode by default, such as an ISO8859 based
|
||||
// locale or GB18030, Tcell can convert input and output, so that your
|
||||
// terminal can operate in whatever locale is most convenient, while the
|
||||
// application program can just assume "everything is UTF-8". Reasonable
|
||||
// defaults are used for updating characters to something suitable for
|
||||
// display. Unicode box drawing characters will be converted to use the
|
||||
// alternate character set of your terminal, if native conversions are
|
||||
// not available. If no ACS is available, then some ASCII fallbacks will
|
||||
// be used.
|
||||
//
|
||||
// Note that support for non-UTF-8 locales (other than C) must be enabled
|
||||
// by the application using RegisterEncoding() -- we don't have them all
|
||||
// enabled by default to avoid bloating the application unneccessarily.
|
||||
// (These days UTF-8 is good enough for almost everyone, and nobody should
|
||||
// be using legacy locales anymore.) Also, actual glyphs for various code
|
||||
// point will only be displayed if your terminal or emulator (or the font
|
||||
// the emulator is using) supports them.
|
||||
//
|
||||
// A rich set of keycodes is supported, with support for up to 65 function
|
||||
// keys, and various other special keys.
|
||||
//
|
||||
package tcell
|
139
vendor/maunium.net/go/tcell/encoding.go
generated
vendored
Normal file
139
vendor/maunium.net/go/tcell/encoding.go
generated
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"golang.org/x/text/encoding"
|
||||
|
||||
gencoding "github.com/gdamore/encoding"
|
||||
)
|
||||
|
||||
var encodings map[string]encoding.Encoding
|
||||
var encodingLk sync.Mutex
|
||||
var encodingFallback EncodingFallback = EncodingFallbackFail
|
||||
|
||||
// RegisterEncoding may be called by the application to register an encoding.
|
||||
// The presence of additional encodings will facilitate application usage with
|
||||
// terminal environments where the I/O subsystem does not support Unicode.
|
||||
//
|
||||
// Windows systems use Unicode natively, and do not need any of the encoding
|
||||
// subsystem when using Windows Console screens.
|
||||
//
|
||||
// Please see the Go documentation for golang.org/x/text/encoding -- most of
|
||||
// the common ones exist already as stock variables. For example, ISO8859-15
|
||||
// can be registered using the following code:
|
||||
//
|
||||
// import "golang.org/x/text/encoding/charmap"
|
||||
//
|
||||
// ...
|
||||
// RegisterEncoding("ISO8859-15", charmap.ISO8859_15)
|
||||
//
|
||||
// Aliases can be registered as well, for example "8859-15" could be an alias
|
||||
// for "ISO8859-15".
|
||||
//
|
||||
// For POSIX systems, the tcell package will check the environment variables
|
||||
// LC_ALL, LC_CTYPE, and LANG (in that order) to determine the character set.
|
||||
// These are expected to have the following pattern:
|
||||
//
|
||||
// $language[.$codeset[@$variant]
|
||||
//
|
||||
// We extract only the $codeset part, which will usually be something like
|
||||
// UTF-8 or ISO8859-15 or KOI8-R. Note that if the locale is either "POSIX"
|
||||
// or "C", then we assume US-ASCII (the POSIX 'portable character set'
|
||||
// and assume all other characters are somehow invalid.)
|
||||
//
|
||||
// Modern POSIX systems and terminal emulators may use UTF-8, and for those
|
||||
// systems, this API is also unnecessary. For example, Darwin (MacOS X) and
|
||||
// modern Linux running modern xterm generally will out of the box without
|
||||
// any of this. Use of UTF-8 is recommended when possible, as it saves
|
||||
// quite a lot processing overhead.
|
||||
//
|
||||
// Note that some encodings are quite large (for example GB18030 which is a
|
||||
// superset of Unicode) and so the application size can be expected ot
|
||||
// increase quite a bit as each encoding is added. The East Asian encodings
|
||||
// have been seen to add 100-200K per encoding to the application size.
|
||||
//
|
||||
func RegisterEncoding(charset string, enc encoding.Encoding) {
|
||||
encodingLk.Lock()
|
||||
charset = strings.ToLower(charset)
|
||||
encodings[charset] = enc
|
||||
encodingLk.Unlock()
|
||||
}
|
||||
|
||||
// EncodingFallback describes how the system behavees when the locale
|
||||
// requires a character set that we do not support. The system always
|
||||
// supports UTF-8 and US-ASCII. On Windows consoles, UTF-16LE is also
|
||||
// supported automatically. Other character sets must be added using the
|
||||
// RegisterEncoding API. (A large group of nearly all of them can be
|
||||
// added using the RegisterAll function in the encoding sub package.)
|
||||
type EncodingFallback int
|
||||
|
||||
const (
|
||||
// EncodingFallbackFail behavior causes GetEncoding to fail
|
||||
// when it cannot find an encoding.
|
||||
EncodingFallbackFail = iota
|
||||
|
||||
// EncodingFallbackASCII behaviore causes GetEncoding to fall back
|
||||
// to a 7-bit ASCII encoding, if no other encoding can be found.
|
||||
EncodingFallbackASCII
|
||||
|
||||
// EncodingFallbackUTF8 behavior causes GetEncoding to assume
|
||||
// UTF8 can pass unmodified upon failure. Note that this behavior
|
||||
// is not recommended, unless you are sure your terminal can cope
|
||||
// with real UTF8 sequences.
|
||||
EncodingFallbackUTF8
|
||||
)
|
||||
|
||||
// SetEncodingFallback changes the behavior of GetEncoding when a suitable
|
||||
// encoding is not found. The default is EncodingFallbackFail, which
|
||||
// causes GetEncoding to simply return nil.
|
||||
func SetEncodingFallback(fb EncodingFallback) {
|
||||
encodingLk.Lock()
|
||||
encodingFallback = fb
|
||||
encodingLk.Unlock()
|
||||
}
|
||||
|
||||
// GetEncoding is used by Screen implementors who want to locate an encoding
|
||||
// for the given character set name. Note that this will return nil for
|
||||
// either the Unicode (UTF-8) or ASCII encodings, since we don't use
|
||||
// encodings for them but instead have our own native methods.
|
||||
func GetEncoding(charset string) encoding.Encoding {
|
||||
charset = strings.ToLower(charset)
|
||||
encodingLk.Lock()
|
||||
defer encodingLk.Unlock()
|
||||
if enc, ok := encodings[charset]; ok {
|
||||
return enc
|
||||
}
|
||||
switch encodingFallback {
|
||||
case EncodingFallbackASCII:
|
||||
return gencoding.ASCII
|
||||
case EncodingFallbackUTF8:
|
||||
return encoding.Nop
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// We always support UTF-8 and ASCII.
|
||||
encodings = make(map[string]encoding.Encoding)
|
||||
encodings["utf-8"] = gencoding.UTF8
|
||||
encodings["utf8"] = gencoding.UTF8
|
||||
encodings["us-ascii"] = gencoding.ASCII
|
||||
encodings["ascii"] = gencoding.ASCII
|
||||
encodings["iso646"] = gencoding.ASCII
|
||||
}
|
73
vendor/maunium.net/go/tcell/errors.go
generated
vendored
Normal file
73
vendor/maunium.net/go/tcell/errors.go
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"maunium.net/go/tcell/terminfo"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrTermNotFound indicates that a suitable terminal entry could
|
||||
// not be found. This can result from either not having TERM set,
|
||||
// or from the TERM failing to support certain minimal functionality,
|
||||
// in particular absolute cursor addressability (the cup capability)
|
||||
// is required. For example, legacy "adm3" lacks this capability,
|
||||
// whereas the slightly newer "adm3a" supports it. This failure
|
||||
// occurs most often with "dumb".
|
||||
ErrTermNotFound = terminfo.ErrTermNotFound
|
||||
|
||||
// ErrNoScreen indicates that no suitable screen could be found.
|
||||
// This may result from attempting to run on a platform where there
|
||||
// is no support for either termios or console I/O (such as nacl),
|
||||
// or from running in an environment where there is no access to
|
||||
// a suitable console/terminal device. (For example, running on
|
||||
// without a controlling TTY or with no /dev/tty on POSIX platforms.)
|
||||
ErrNoScreen = errors.New("no suitable screen available")
|
||||
|
||||
// ErrNoCharset indicates that the locale environment the
|
||||
// program is not supported by the program, because no suitable
|
||||
// encoding was found for it. This problem never occurs if
|
||||
// the environment is UTF-8 or UTF-16.
|
||||
ErrNoCharset = errors.New("character set not supported")
|
||||
|
||||
// ErrEventQFull indicates that the event queue is full, and
|
||||
// cannot accept more events.
|
||||
ErrEventQFull = errors.New("event queue full")
|
||||
)
|
||||
|
||||
// An EventError is an event representing some sort of error, and carries
|
||||
// an error payload.
|
||||
type EventError struct {
|
||||
t time.Time
|
||||
err error
|
||||
}
|
||||
|
||||
// When returns the time when the event was created.
|
||||
func (ev *EventError) When() time.Time {
|
||||
return ev.t
|
||||
}
|
||||
|
||||
// Error implements the error.
|
||||
func (ev *EventError) Error() string {
|
||||
return ev.err.Error()
|
||||
}
|
||||
|
||||
// NewEventError creates an ErrorEvent with the given error payload.
|
||||
func NewEventError(err error) *EventError {
|
||||
return &EventError{t: time.Now(), err: err}
|
||||
}
|
53
vendor/maunium.net/go/tcell/event.go
generated
vendored
Normal file
53
vendor/maunium.net/go/tcell/event.go
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Event is a generic interface used for passing around Events.
|
||||
// Concrete types follow.
|
||||
type Event interface {
|
||||
// When reports the time when the event was generated.
|
||||
When() time.Time
|
||||
}
|
||||
|
||||
// EventTime is a simple base event class, suitable for easy reuse.
|
||||
// It can be used to deliver actual timer events as well.
|
||||
type EventTime struct {
|
||||
when time.Time
|
||||
}
|
||||
|
||||
// When returns the time stamp when the event occurred.
|
||||
func (e *EventTime) When() time.Time {
|
||||
return e.when
|
||||
}
|
||||
|
||||
// SetEventTime sets the time of occurrence for the event.
|
||||
func (e *EventTime) SetEventTime(t time.Time) {
|
||||
e.when = t
|
||||
}
|
||||
|
||||
// SetEventNow sets the time of occurrence for the event to the current time.
|
||||
func (e *EventTime) SetEventNow() {
|
||||
e.SetEventTime(time.Now())
|
||||
}
|
||||
|
||||
// EventHandler is anything that handles events. If the handler has
|
||||
// consumed the event, it should return true. False otherwise.
|
||||
type EventHandler interface {
|
||||
HandleEvent(Event) bool
|
||||
}
|
41
vendor/maunium.net/go/tcell/interrupt.go
generated
vendored
Normal file
41
vendor/maunium.net/go/tcell/interrupt.go
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// EventInterrupt is a generic wakeup event. Its can be used to
|
||||
// to request a redraw. It can carry an arbitrary payload, as well.
|
||||
type EventInterrupt struct {
|
||||
t time.Time
|
||||
v interface{}
|
||||
}
|
||||
|
||||
// When returns the time when this event was created.
|
||||
func (ev *EventInterrupt) When() time.Time {
|
||||
return ev.t
|
||||
}
|
||||
|
||||
// Data is used to obtain the opaque event payload.
|
||||
func (ev *EventInterrupt) Data() interface{} {
|
||||
return ev.v
|
||||
}
|
||||
|
||||
// NewEventInterrupt creates an EventInterrupt with the given payload.
|
||||
func NewEventInterrupt(data interface{}) *EventInterrupt {
|
||||
return &EventInterrupt{t: time.Now(), v: data}
|
||||
}
|
508
vendor/maunium.net/go/tcell/key.go
generated
vendored
Normal file
508
vendor/maunium.net/go/tcell/key.go
generated
vendored
Normal file
@ -0,0 +1,508 @@
|
||||
// Copyright 2016 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// EventKey represents a key press. Usually this is a key press followed
|
||||
// by a key release, but since terminal programs don't have a way to report
|
||||
// key release events, we usually get just one event. If a key is held down
|
||||
// then the terminal may synthesize repeated key presses at some predefined
|
||||
// rate. We have no control over that, nor visibility into it.
|
||||
//
|
||||
// In some cases, we can have a modifier key, such as ModAlt, that can be
|
||||
// generated with a key press. (This usually is represented by having the
|
||||
// high bit set, or in some cases, by sending an ESC prior to the rune.)
|
||||
//
|
||||
// If the value of Key() is KeyRune, then the actual key value will be
|
||||
// available with the Rune() method. This will be the case for most keys.
|
||||
// In most situations, the modifiers will not be set. For example, if the
|
||||
// rune is 'A', this will be reported without the ModShift bit set, since
|
||||
// really can't tell if the Shift key was pressed (it might have been CAPSLOCK,
|
||||
// or a terminal that only can send capitals, or keyboard with separate
|
||||
// capital letters from lower case letters).
|
||||
//
|
||||
// Generally, terminal applications have far less visibility into keyboard
|
||||
// activity than graphical applications. Hence, they should avoid depending
|
||||
// overly much on availability of modifiers, or the availability of any
|
||||
// specific keys.
|
||||
type EventKey struct {
|
||||
t time.Time
|
||||
mod ModMask
|
||||
key Key
|
||||
ch rune
|
||||
}
|
||||
|
||||
// When returns the time when this Event was created, which should closely
|
||||
// match the time when the key was pressed.
|
||||
func (ev *EventKey) When() time.Time {
|
||||
return ev.t
|
||||
}
|
||||
|
||||
// Rune returns the rune corresponding to the key press, if it makes sense.
|
||||
// The result is only defined if the value of Key() is KeyRune.
|
||||
func (ev *EventKey) Rune() rune {
|
||||
return ev.ch
|
||||
}
|
||||
|
||||
// Key returns a virtual key code. We use this to identify specific key
|
||||
// codes, such as KeyEnter, etc. Most control and function keys are reported
|
||||
// with unique Key values. Normal alphanumeric and punctuation keys will
|
||||
// generally return KeyRune here; the specific key can be further decoded
|
||||
// using the Rune() function.
|
||||
func (ev *EventKey) Key() Key {
|
||||
return ev.key
|
||||
}
|
||||
|
||||
// Modifiers returns the modifiers that were present with the key press. Note
|
||||
// that not all platforms and terminals support this equally well, and some
|
||||
// cases we will not not know for sure. Hence, applications should avoid
|
||||
// using this in most circumstances.
|
||||
func (ev *EventKey) Modifiers() ModMask {
|
||||
return ev.mod
|
||||
}
|
||||
|
||||
// KeyNames holds the written names of special keys. Useful to echo back a key
|
||||
// name, or to look up a key from a string value.
|
||||
var KeyNames = map[Key]string{
|
||||
KeyEnter: "Enter",
|
||||
KeyBackspace: "Backspace",
|
||||
KeyTab: "Tab",
|
||||
KeyBacktab: "Backtab",
|
||||
KeyEsc: "Esc",
|
||||
KeyBackspace2: "Backspace2",
|
||||
KeyDelete: "Delete",
|
||||
KeyInsert: "Insert",
|
||||
KeyUp: "Up",
|
||||
KeyDown: "Down",
|
||||
KeyLeft: "Left",
|
||||
KeyRight: "Right",
|
||||
KeyAltUp: "AltUp",
|
||||
KeyAltDown: "AltDown",
|
||||
KeyAltLeft: "AltLeft",
|
||||
KeyAltRight: "AltRight",
|
||||
KeyCtrlUp: "CtrlUp",
|
||||
KeyCtrlDown: "CtrlDown",
|
||||
KeyCtrlLeft: "CtrlLeft",
|
||||
KeyCtrlRight: "CtrlRight",
|
||||
KeyShiftUp: "ShiftUp",
|
||||
KeyShiftDown: "ShiftDown",
|
||||
KeyShiftLeft: "ShiftLeft",
|
||||
KeyShiftRight: "ShiftRight",
|
||||
KeyAltShiftUp: "AltShiftUp",
|
||||
KeyAltShiftDown: "AltShiftDown",
|
||||
KeyAltShiftLeft: "AltShiftLeft",
|
||||
KeyAltShiftRight: "AltShiftRight",
|
||||
KeyCtrlShiftUp: "CtrlShiftUp",
|
||||
KeyCtrlShiftDown: "CtrlShiftDown",
|
||||
KeyCtrlShiftLeft: "CtrlShiftLeft",
|
||||
KeyCtrlShiftRight: "CtrlShiftRight",
|
||||
KeyHome: "Home",
|
||||
KeyEnd: "End",
|
||||
KeyUpLeft: "UpLeft",
|
||||
KeyUpRight: "UpRight",
|
||||
KeyDownLeft: "DownLeft",
|
||||
KeyDownRight: "DownRight",
|
||||
KeyCenter: "Center",
|
||||
KeyPgDn: "PgDn",
|
||||
KeyPgUp: "PgUp",
|
||||
KeyCtrlPgUp: "CtrlPgUp",
|
||||
KeyCtrlPgDn: "CtrlPgDn",
|
||||
KeyClear: "Clear",
|
||||
KeyExit: "Exit",
|
||||
KeyCancel: "Cancel",
|
||||
KeyPause: "Pause",
|
||||
KeyPrint: "Print",
|
||||
KeyF1: "F1",
|
||||
KeyF2: "F2",
|
||||
KeyF3: "F3",
|
||||
KeyF4: "F4",
|
||||
KeyF5: "F5",
|
||||
KeyF6: "F6",
|
||||
KeyF7: "F7",
|
||||
KeyF8: "F8",
|
||||
KeyF9: "F9",
|
||||
KeyF10: "F10",
|
||||
KeyF11: "F11",
|
||||
KeyF12: "F12",
|
||||
KeyF13: "F13",
|
||||
KeyF14: "F14",
|
||||
KeyF15: "F15",
|
||||
KeyF16: "F16",
|
||||
KeyF17: "F17",
|
||||
KeyF18: "F18",
|
||||
KeyF19: "F19",
|
||||
KeyF20: "F20",
|
||||
KeyF21: "F21",
|
||||
KeyF22: "F22",
|
||||
KeyF23: "F23",
|
||||
KeyF24: "F24",
|
||||
KeyF25: "F25",
|
||||
KeyF26: "F26",
|
||||
KeyF27: "F27",
|
||||
KeyF28: "F28",
|
||||
KeyF29: "F29",
|
||||
KeyF30: "F30",
|
||||
KeyF31: "F31",
|
||||
KeyF32: "F32",
|
||||
KeyF33: "F33",
|
||||
KeyF34: "F34",
|
||||
KeyF35: "F35",
|
||||
KeyF36: "F36",
|
||||
KeyF37: "F37",
|
||||
KeyF38: "F38",
|
||||
KeyF39: "F39",
|
||||
KeyF40: "F40",
|
||||
KeyF41: "F41",
|
||||
KeyF42: "F42",
|
||||
KeyF43: "F43",
|
||||
KeyF44: "F44",
|
||||
KeyF45: "F45",
|
||||
KeyF46: "F46",
|
||||
KeyF47: "F47",
|
||||
KeyF48: "F48",
|
||||
KeyF49: "F49",
|
||||
KeyF50: "F50",
|
||||
KeyF51: "F51",
|
||||
KeyF52: "F52",
|
||||
KeyF53: "F53",
|
||||
KeyF54: "F54",
|
||||
KeyF55: "F55",
|
||||
KeyF56: "F56",
|
||||
KeyF57: "F57",
|
||||
KeyF58: "F58",
|
||||
KeyF59: "F59",
|
||||
KeyF60: "F60",
|
||||
KeyF61: "F61",
|
||||
KeyF62: "F62",
|
||||
KeyF63: "F63",
|
||||
KeyF64: "F64",
|
||||
KeyCtrlA: "Ctrl-A",
|
||||
KeyCtrlB: "Ctrl-B",
|
||||
KeyCtrlC: "Ctrl-C",
|
||||
KeyCtrlD: "Ctrl-D",
|
||||
KeyCtrlE: "Ctrl-E",
|
||||
KeyCtrlF: "Ctrl-F",
|
||||
KeyCtrlG: "Ctrl-G",
|
||||
KeyCtrlJ: "Ctrl-J",
|
||||
KeyCtrlK: "Ctrl-K",
|
||||
KeyCtrlL: "Ctrl-L",
|
||||
KeyCtrlN: "Ctrl-N",
|
||||
KeyCtrlO: "Ctrl-O",
|
||||
KeyCtrlP: "Ctrl-P",
|
||||
KeyCtrlQ: "Ctrl-Q",
|
||||
KeyCtrlR: "Ctrl-R",
|
||||
KeyCtrlS: "Ctrl-S",
|
||||
KeyCtrlT: "Ctrl-T",
|
||||
KeyCtrlU: "Ctrl-U",
|
||||
KeyCtrlV: "Ctrl-V",
|
||||
KeyCtrlW: "Ctrl-W",
|
||||
KeyCtrlX: "Ctrl-X",
|
||||
KeyCtrlY: "Ctrl-Y",
|
||||
KeyCtrlZ: "Ctrl-Z",
|
||||
KeyCtrlSpace: "Ctrl-Space",
|
||||
KeyCtrlUnderscore: "Ctrl-_",
|
||||
KeyCtrlRightSq: "Ctrl-]",
|
||||
KeyCtrlBackslash: "Ctrl-\\",
|
||||
KeyCtrlCarat: "Ctrl-^",
|
||||
}
|
||||
|
||||
// Name returns a printable value or the key stroke. This can be used
|
||||
// when printing the event, for example.
|
||||
func (ev *EventKey) Name() string {
|
||||
s := ""
|
||||
m := []string{}
|
||||
if ev.mod&ModShift != 0 {
|
||||
m = append(m, "Shift")
|
||||
}
|
||||
if ev.mod&ModAlt != 0 {
|
||||
m = append(m, "Alt")
|
||||
}
|
||||
if ev.mod&ModMeta != 0 {
|
||||
m = append(m, "Meta")
|
||||
}
|
||||
if ev.mod&ModCtrl != 0 {
|
||||
m = append(m, "Ctrl")
|
||||
}
|
||||
|
||||
ok := false
|
||||
if s, ok = KeyNames[ev.key]; !ok {
|
||||
if ev.key == KeyRune {
|
||||
s = "Rune[" + string(ev.ch) + "]"
|
||||
} else {
|
||||
s = fmt.Sprintf("Key[%d,%d]", ev.key, int(ev.ch))
|
||||
}
|
||||
}
|
||||
if len(m) != 0 {
|
||||
if ev.mod&ModCtrl != 0 && strings.HasPrefix(s, "Ctrl-") {
|
||||
s = s[5:]
|
||||
}
|
||||
return fmt.Sprintf("%s+%s", strings.Join(m, "+"), s)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// NewEventKey attempts to create a suitable event. It parses the various
|
||||
// ASCII control sequences if KeyRune is passed for Key, but if the caller
|
||||
// has more precise information it should set that specifically. Callers
|
||||
// that aren't sure about modifier state (most) should just pass ModNone.
|
||||
func NewEventKey(k Key, ch rune, mod ModMask) *EventKey {
|
||||
if k == KeyRune && (ch < ' ' || ch == 0x7f) {
|
||||
// Turn specials into proper key codes. This is for
|
||||
// control characters and the DEL.
|
||||
k = Key(ch)
|
||||
if mod == ModNone && ch < ' ' {
|
||||
switch Key(ch) {
|
||||
case KeyBackspace, KeyTab, KeyEsc, KeyEnter:
|
||||
// these keys are directly typeable without CTRL
|
||||
default:
|
||||
// most likely entered with a CTRL keypress
|
||||
mod = ModCtrl
|
||||
}
|
||||
}
|
||||
}
|
||||
return &EventKey{t: time.Now(), key: k, ch: ch, mod: mod}
|
||||
}
|
||||
|
||||
// ModMask is a mask of modifier keys. Note that it will not always be
|
||||
// possible to report modifier keys.
|
||||
type ModMask int16
|
||||
|
||||
// These are the modifiers keys that can be sent either with a key press,
|
||||
// or a mouse event. Note that as of now, due to the confusion associated
|
||||
// with Meta, and the lack of support for it on many/most platforms, the
|
||||
// current implementations never use it. Instead, they use ModAlt, even for
|
||||
// events that could possibly have been distinguished from ModAlt.
|
||||
const (
|
||||
ModShift ModMask = 1 << iota
|
||||
ModCtrl
|
||||
ModAlt
|
||||
ModMeta
|
||||
ModNone ModMask = 0
|
||||
)
|
||||
|
||||
// Key is a generic value for representing keys, and especially special
|
||||
// keys (function keys, cursor movement keys, etc.) For normal keys, like
|
||||
// ASCII letters, we use KeyRune, and then expect the application to
|
||||
// inspect the Rune() member of the EventKey.
|
||||
type Key int16
|
||||
|
||||
// This is the list of named keys. KeyRune is special however, in that it is
|
||||
// a place holder key indicating that a printable character was sent. The
|
||||
// actual value of the rune will be transported in the Rune of the associated
|
||||
// EventKey.
|
||||
const (
|
||||
KeyRune Key = iota + 256
|
||||
KeyUp
|
||||
KeyDown
|
||||
KeyRight
|
||||
KeyLeft
|
||||
KeyUpLeft
|
||||
KeyUpRight
|
||||
KeyDownLeft
|
||||
KeyDownRight
|
||||
KeyAltUp
|
||||
KeyAltDown
|
||||
KeyAltLeft
|
||||
KeyAltRight
|
||||
KeyCtrlUp
|
||||
KeyCtrlDown
|
||||
KeyCtrlLeft
|
||||
KeyCtrlRight
|
||||
KeyShiftUp
|
||||
KeyShiftDown
|
||||
KeyShiftLeft
|
||||
KeyShiftRight
|
||||
KeyAltShiftUp
|
||||
KeyAltShiftDown
|
||||
KeyAltShiftLeft
|
||||
KeyAltShiftRight
|
||||
KeyCtrlShiftUp
|
||||
KeyCtrlShiftDown
|
||||
KeyCtrlShiftLeft
|
||||
KeyCtrlShiftRight
|
||||
KeyCenter
|
||||
KeyPgUp
|
||||
KeyPgDn
|
||||
KeyCtrlPgUp
|
||||
KeyCtrlPgDn
|
||||
KeyHome
|
||||
KeyEnd
|
||||
KeyInsert
|
||||
KeyDelete
|
||||
KeyHelp
|
||||
KeyExit
|
||||
KeyClear
|
||||
KeyCancel
|
||||
KeyPrint
|
||||
KeyPause
|
||||
KeyBacktab
|
||||
KeyF1
|
||||
KeyF2
|
||||
KeyF3
|
||||
KeyF4
|
||||
KeyF5
|
||||
KeyF6
|
||||
KeyF7
|
||||
KeyF8
|
||||
KeyF9
|
||||
KeyF10
|
||||
KeyF11
|
||||
KeyF12
|
||||
KeyF13
|
||||
KeyF14
|
||||
KeyF15
|
||||
KeyF16
|
||||
KeyF17
|
||||
KeyF18
|
||||
KeyF19
|
||||
KeyF20
|
||||
KeyF21
|
||||
KeyF22
|
||||
KeyF23
|
||||
KeyF24
|
||||
KeyF25
|
||||
KeyF26
|
||||
KeyF27
|
||||
KeyF28
|
||||
KeyF29
|
||||
KeyF30
|
||||
KeyF31
|
||||
KeyF32
|
||||
KeyF33
|
||||
KeyF34
|
||||
KeyF35
|
||||
KeyF36
|
||||
KeyF37
|
||||
KeyF38
|
||||
KeyF39
|
||||
KeyF40
|
||||
KeyF41
|
||||
KeyF42
|
||||
KeyF43
|
||||
KeyF44
|
||||
KeyF45
|
||||
KeyF46
|
||||
KeyF47
|
||||
KeyF48
|
||||
KeyF49
|
||||
KeyF50
|
||||
KeyF51
|
||||
KeyF52
|
||||
KeyF53
|
||||
KeyF54
|
||||
KeyF55
|
||||
KeyF56
|
||||
KeyF57
|
||||
KeyF58
|
||||
KeyF59
|
||||
KeyF60
|
||||
KeyF61
|
||||
KeyF62
|
||||
KeyF63
|
||||
KeyF64
|
||||
)
|
||||
|
||||
// These are the control keys. Note that they overlap with other keys,
|
||||
// perhaps. For example, KeyCtrlH is the same as KeyBackspace.
|
||||
const (
|
||||
KeyCtrlSpace Key = iota
|
||||
KeyCtrlA
|
||||
KeyCtrlB
|
||||
KeyCtrlC
|
||||
KeyCtrlD
|
||||
KeyCtrlE
|
||||
KeyCtrlF
|
||||
KeyCtrlG
|
||||
KeyCtrlH
|
||||
KeyCtrlI
|
||||
KeyCtrlJ
|
||||
KeyCtrlK
|
||||
KeyCtrlL
|
||||
KeyCtrlM
|
||||
KeyCtrlN
|
||||
KeyCtrlO
|
||||
KeyCtrlP
|
||||
KeyCtrlQ
|
||||
KeyCtrlR
|
||||
KeyCtrlS
|
||||
KeyCtrlT
|
||||
KeyCtrlU
|
||||
KeyCtrlV
|
||||
KeyCtrlW
|
||||
KeyCtrlX
|
||||
KeyCtrlY
|
||||
KeyCtrlZ
|
||||
KeyCtrlLeftSq // Escape
|
||||
KeyCtrlBackslash
|
||||
KeyCtrlRightSq
|
||||
KeyCtrlCarat
|
||||
KeyCtrlUnderscore
|
||||
)
|
||||
|
||||
// Special values - these are fixed in an attempt to make it more likely
|
||||
// that aliases will encode the same way.
|
||||
|
||||
// These are the defined ASCII values for key codes. They generally match
|
||||
// with KeyCtrl values.
|
||||
const (
|
||||
KeyNUL Key = iota
|
||||
KeySOH
|
||||
KeySTX
|
||||
KeyETX
|
||||
KeyEOT
|
||||
KeyENQ
|
||||
KeyACK
|
||||
KeyBEL
|
||||
KeyBS
|
||||
KeyTAB
|
||||
KeyLF
|
||||
KeyVT
|
||||
KeyFF
|
||||
KeyCR
|
||||
KeySO
|
||||
KeySI
|
||||
KeyDLE
|
||||
KeyDC1
|
||||
KeyDC2
|
||||
KeyDC3
|
||||
KeyDC4
|
||||
KeyNAK
|
||||
KeySYN
|
||||
KeyETB
|
||||
KeyCAN
|
||||
KeyEM
|
||||
KeySUB
|
||||
KeyESC
|
||||
KeyFS
|
||||
KeyGS
|
||||
KeyRS
|
||||
KeyUS
|
||||
KeyDEL Key = 0x7F
|
||||
)
|
||||
|
||||
// These keys are aliases for other names.
|
||||
const (
|
||||
KeyBackspace = KeyBS
|
||||
KeyTab = KeyTAB
|
||||
KeyEsc = KeyESC
|
||||
KeyEscape = KeyESC
|
||||
KeyEnter = KeyCR
|
||||
KeyBackspace2 = KeyDEL
|
||||
)
|
103
vendor/maunium.net/go/tcell/mouse.go
generated
vendored
Normal file
103
vendor/maunium.net/go/tcell/mouse.go
generated
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// EventMouse is a mouse event. It is sent on either mouse up or mouse down
|
||||
// events. It is also sent on mouse motion events - if the terminal supports
|
||||
// it. We make every effort to ensure that mouse release events are delivered.
|
||||
// Hence, click drag can be identified by a motion event with the mouse down,
|
||||
// without any intervening button release. On some terminals only the initiating
|
||||
// press and terminating release event will be delivered.
|
||||
//
|
||||
// Mouse wheel events, when reported, may appear on their own as individual
|
||||
// impulses; that is, there will normally not be a release event delivered
|
||||
// for mouse wheel movements.
|
||||
//
|
||||
// Most terminals cannot report the state of more than one button at a time --
|
||||
// and some cannot report motion events unless a button is pressed.
|
||||
//
|
||||
// Applications can inspect the time between events to resolve double or
|
||||
// triple clicks.
|
||||
type EventMouse struct {
|
||||
t time.Time
|
||||
btn ButtonMask
|
||||
mod ModMask
|
||||
motion bool
|
||||
x int
|
||||
y int
|
||||
}
|
||||
|
||||
// When returns the time when this EventMouse was created.
|
||||
func (ev *EventMouse) When() time.Time {
|
||||
return ev.t
|
||||
}
|
||||
|
||||
// Buttons returns the list of buttons that were pressed or wheel motions.
|
||||
func (ev *EventMouse) Buttons() ButtonMask {
|
||||
return ev.btn
|
||||
}
|
||||
|
||||
// Modifiers returns a list of keyboard modifiers that were pressed
|
||||
// with the mouse button(s).
|
||||
func (ev *EventMouse) Modifiers() ModMask {
|
||||
return ev.mod
|
||||
}
|
||||
|
||||
// Position returns the mouse position in character cells. The origin
|
||||
// 0, 0 is at the upper left corner.
|
||||
func (ev *EventMouse) Position() (int, int) {
|
||||
return ev.x, ev.y
|
||||
}
|
||||
|
||||
// HasMotion returns whether the mouse event was a mouse motion event or not
|
||||
func (ev *EventMouse) HasMotion() bool {
|
||||
return ev.motion
|
||||
}
|
||||
|
||||
// NewEventMouse is used to create a new mouse event. Applications
|
||||
// shouldn't need to use this; its mostly for screen implementors.
|
||||
func NewEventMouse(x, y int, btn ButtonMask, mod ModMask, motion bool) *EventMouse {
|
||||
return &EventMouse{t: time.Now(), x: x, y: y, btn: btn, mod: mod, motion: motion}
|
||||
}
|
||||
|
||||
// ButtonMask is a mask of mouse buttons and wheel events. Mouse button presses
|
||||
// are normally delivered as both press and release events. Mouse wheel events
|
||||
// are normally just single impulse events. Windows supports up to eight
|
||||
// separate buttons plus all four wheel directions, but XTerm can only support
|
||||
// mouse buttons 1-3 and wheel up/down. Its not unheard of for terminals
|
||||
// to support only one or two buttons (think Macs). Old terminals, and true
|
||||
// emulations (such as vt100) won't support mice at all, of course.
|
||||
type ButtonMask int16
|
||||
|
||||
// These are the actual button values.
|
||||
const (
|
||||
Button1 ButtonMask = 1 << iota // Usually left mouse button.
|
||||
Button2 // Usually the middle mouse button.
|
||||
Button3 // Usually the right mouse button.
|
||||
Button4 // Often a side button (thumb/next).
|
||||
Button5 // Often a side button (thumb/prev).
|
||||
Button6
|
||||
Button7
|
||||
Button8
|
||||
WheelUp // Wheel motion up/away from user.
|
||||
WheelDown // Wheel motion down/towards user.
|
||||
WheelLeft // Wheel motion to left.
|
||||
WheelRight // Wheel motion to right.
|
||||
ButtonNone ButtonMask = 0 // No button or wheel events.
|
||||
)
|
42
vendor/maunium.net/go/tcell/paste.go
generated
vendored
Normal file
42
vendor/maunium.net/go/tcell/paste.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright 2016 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import "time"
|
||||
|
||||
// EventPaste represents a bracketed paste event.
|
||||
type EventPaste struct {
|
||||
t time.Time
|
||||
text string
|
||||
}
|
||||
|
||||
// When returns the time when this Event was created, which should closely
|
||||
// match the time when the paste was made.
|
||||
func (e *EventPaste) When() time.Time {
|
||||
return e.t
|
||||
}
|
||||
|
||||
// Text returns the text that was pasted
|
||||
func (e *EventPaste) Text() string {
|
||||
return e.text
|
||||
}
|
||||
|
||||
// NewEventPaste creates a new paste event from the given text
|
||||
func NewEventPaste(text string) *EventPaste {
|
||||
return &EventPaste{
|
||||
t: time.Now(),
|
||||
text: text,
|
||||
}
|
||||
}
|
42
vendor/maunium.net/go/tcell/resize.go
generated
vendored
Normal file
42
vendor/maunium.net/go/tcell/resize.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// EventResize is sent when the window size changes.
|
||||
type EventResize struct {
|
||||
t time.Time
|
||||
w int
|
||||
h int
|
||||
}
|
||||
|
||||
// NewEventResize creates an EventResize with the new updated window size,
|
||||
// which is given in character cells.
|
||||
func NewEventResize(width, height int) *EventResize {
|
||||
return &EventResize{t: time.Now(), w: width, h: height}
|
||||
}
|
||||
|
||||
// When returns the time when the Event was created.
|
||||
func (ev *EventResize) When() time.Time {
|
||||
return ev.t
|
||||
}
|
||||
|
||||
// Size returns the new window size as width, height in character cells.
|
||||
func (ev *EventResize) Size() (int, int) {
|
||||
return ev.w, ev.h
|
||||
}
|
111
vendor/maunium.net/go/tcell/runes.go
generated
vendored
Normal file
111
vendor/maunium.net/go/tcell/runes.go
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// The names of these constants are chosen to match Terminfo names,
|
||||
// modulo case, and changing the prefix from ACS_ to Rune. These are
|
||||
// the runes we provide extra special handling for, with ASCII fallbacks
|
||||
// for terminals that lack them.
|
||||
const (
|
||||
RuneSterling = '£'
|
||||
RuneDArrow = '↓'
|
||||
RuneLArrow = '←'
|
||||
RuneRArrow = '→'
|
||||
RuneUArrow = '↑'
|
||||
RuneBullet = '·'
|
||||
RuneBoard = '░'
|
||||
RuneCkBoard = '▒'
|
||||
RuneDegree = '°'
|
||||
RuneDiamond = '◆'
|
||||
RuneGEqual = '≥'
|
||||
RunePi = 'π'
|
||||
RuneHLine = '─'
|
||||
RuneLantern = '§'
|
||||
RunePlus = '┼'
|
||||
RuneLEqual = '≤'
|
||||
RuneLLCorner = '└'
|
||||
RuneLRCorner = '┘'
|
||||
RuneNEqual = '≠'
|
||||
RunePlMinus = '±'
|
||||
RuneS1 = '⎺'
|
||||
RuneS3 = '⎻'
|
||||
RuneS7 = '⎼'
|
||||
RuneS9 = '⎽'
|
||||
RuneBlock = '█'
|
||||
RuneTTee = '┬'
|
||||
RuneRTee = '┤'
|
||||
RuneLTee = '├'
|
||||
RuneBTee = '┴'
|
||||
RuneULCorner = '┌'
|
||||
RuneURCorner = '┐'
|
||||
RuneVLine = '│'
|
||||
)
|
||||
|
||||
// RuneFallbacks is the default map of fallback strings that will be
|
||||
// used to replace a rune when no other more appropriate transformation
|
||||
// is available, and the rune cannot be displayed directly.
|
||||
//
|
||||
// New entries may be added to this map over time, as it becomes clear
|
||||
// that such is desirable. Characters that represent either letters or
|
||||
// numbers should not be added to this list unless it is certain that
|
||||
// the meaning will still convey unambiguously.
|
||||
//
|
||||
// As an example, it would be appropriate to add an ASCII mapping for
|
||||
// the full width form of the letter 'A', but it would not be appropriate
|
||||
// to do so a glyph representing the country China.
|
||||
//
|
||||
// Programs that desire richer fallbacks may register additional ones,
|
||||
// or change or even remove these mappings with Screen.RegisterRuneFallback
|
||||
// Screen.UnregisterRuneFallback methods.
|
||||
//
|
||||
// Note that Unicode is presumed to be able to display all glyphs.
|
||||
// This is a pretty poor assumption, but there is no easy way to
|
||||
// figure out which glyphs are supported in a given font. Hence,
|
||||
// some care in selecting the characters you support in your application
|
||||
// is still appropriate.
|
||||
var RuneFallbacks = map[rune]string{
|
||||
RuneSterling: "f",
|
||||
RuneDArrow: "v",
|
||||
RuneLArrow: "<",
|
||||
RuneRArrow: ">",
|
||||
RuneUArrow: "^",
|
||||
RuneBullet: "o",
|
||||
RuneBoard: "#",
|
||||
RuneCkBoard: ":",
|
||||
RuneDegree: "\\",
|
||||
RuneDiamond: "+",
|
||||
RuneGEqual: ">",
|
||||
RunePi: "*",
|
||||
RuneHLine: "-",
|
||||
RuneLantern: "#",
|
||||
RunePlus: "+",
|
||||
RuneLEqual: "<",
|
||||
RuneLLCorner: "+",
|
||||
RuneLRCorner: "+",
|
||||
RuneNEqual: "!",
|
||||
RunePlMinus: "#",
|
||||
RuneS1: "~",
|
||||
RuneS3: "-",
|
||||
RuneS7: "-",
|
||||
RuneS9: "_",
|
||||
RuneBlock: "#",
|
||||
RuneTTee: "+",
|
||||
RuneRTee: "+",
|
||||
RuneLTee: "+",
|
||||
RuneBTee: "+",
|
||||
RuneULCorner: "+",
|
||||
RuneURCorner: "+",
|
||||
RuneVLine: "|",
|
||||
}
|
214
vendor/maunium.net/go/tcell/screen.go
generated
vendored
Normal file
214
vendor/maunium.net/go/tcell/screen.go
generated
vendored
Normal file
@ -0,0 +1,214 @@
|
||||
// Copyright 2016 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// Screen represents the physical (or emulated) screen.
|
||||
// This can be a terminal window or a physical console. Platforms implement
|
||||
// this differerently.
|
||||
type Screen interface {
|
||||
// Init initializes the screen for use.
|
||||
Init() error
|
||||
|
||||
// Fini finalizes the screen also releasing resources.
|
||||
Fini()
|
||||
|
||||
// Clear erases the screen. The contents of any screen buffers
|
||||
// will also be cleared. This has the logical effect of
|
||||
// filling the screen with spaces, using the global default style.
|
||||
Clear()
|
||||
|
||||
// Fill fills the screen with the given character and style.
|
||||
Fill(rune, Style)
|
||||
|
||||
// SetCell is an older API, and will be removed. Please use
|
||||
// SetContent instead; SetCell is implemented in terms of SetContent.
|
||||
SetCell(x int, y int, style Style, ch ...rune)
|
||||
|
||||
// GetContent returns the contents at the given location. If the
|
||||
// coordinates are out of range, then the values will be 0, nil,
|
||||
// StyleDefault. Note that the contents returned are logical contents
|
||||
// and may not actually be what is displayed, but rather are what will
|
||||
// be displayed if Show() or Sync() is called. The width is the width
|
||||
// in screen cells; most often this will be 1, but some East Asian
|
||||
// characters require two cells.
|
||||
GetContent(x, y int) (mainc rune, combc []rune, style Style, width int)
|
||||
|
||||
// SetContent sets the contents of the given cell location. If
|
||||
// the coordinates are out of range, then the operation is ignored.
|
||||
//
|
||||
// The first rune is the primary non-zero width rune. The array
|
||||
// that follows is a possible list of combining characters to append,
|
||||
// and will usually be nil (no combining characters.)
|
||||
//
|
||||
// The results are not displayd until Show() or Sync() is called.
|
||||
//
|
||||
// Note that wide (East Asian full width) runes occupy two cells,
|
||||
// and attempts to place character at next cell to the right will have
|
||||
// undefined effects. Wide runes that are printed in the
|
||||
// last column will be replaced with a single width space on output.
|
||||
SetContent(x int, y int, mainc rune, combc []rune, style Style)
|
||||
|
||||
// SetStyle sets the default style to use when clearing the screen
|
||||
// or when StyleDefault is specified. If it is also StyleDefault,
|
||||
// then whatever system/terminal default is relevant will be used.
|
||||
SetStyle(style Style)
|
||||
|
||||
// ShowCursor is used to display the cursor at a given location.
|
||||
// If the coordinates -1, -1 are given or are otherwise outside the
|
||||
// dimensions of the screen, the cursor will be hidden.
|
||||
ShowCursor(x int, y int)
|
||||
|
||||
// HideCursor is used to hide the cursor. Its an alias for
|
||||
// ShowCursor(-1, -1).
|
||||
HideCursor()
|
||||
|
||||
// Size returns the screen size as width, height. This changes in
|
||||
// response to a call to Clear or Flush.
|
||||
Size() (int, int)
|
||||
|
||||
// PollEvent waits for events to arrive. Main application loops
|
||||
// must spin on this to prevent the application from stalling.
|
||||
// Furthermore, this will return nil if the Screen is finalized.
|
||||
PollEvent() Event
|
||||
|
||||
// PostEvent tries to post an event into the event stream. This
|
||||
// can fail if the event queue is full. In that case, the event
|
||||
// is dropped, and ErrEventQFull is returned.
|
||||
PostEvent(ev Event) error
|
||||
|
||||
// PostEventWait is like PostEvent, but if the queue is full, it
|
||||
// blocks until there is space in the queue, making delivery
|
||||
// reliable. However, it is VERY important that this function
|
||||
// never be called from within whatever event loop is polling
|
||||
// with PollEvent(), otherwise a deadlock may arise.
|
||||
//
|
||||
// For this reason, when using this function, the use of a
|
||||
// Goroutine is recommended to ensure no deadlock can occur.
|
||||
PostEventWait(ev Event)
|
||||
|
||||
// EnableMouse enables the mouse. (If your terminal supports it.)
|
||||
EnableMouse()
|
||||
|
||||
// DisableMouse disables the mouse.
|
||||
DisableMouse()
|
||||
|
||||
// HasMouse returns true if the terminal (apparently) supports a
|
||||
// mouse. Note that the a return value of true doesn't guarantee that
|
||||
// a mouse/pointing device is present; a false return definitely
|
||||
// indicates no mouse support is available.
|
||||
HasMouse() bool
|
||||
|
||||
// Colors returns the number of colors. All colors are assumed to
|
||||
// use the ANSI color map. If a terminal is monochrome, it will
|
||||
// return 0.
|
||||
Colors() int
|
||||
|
||||
// Show makes all the content changes made using SetContent() visible
|
||||
// on the display.
|
||||
//
|
||||
// It does so in the most efficient and least visually disruptive
|
||||
// manner possible.
|
||||
Show()
|
||||
|
||||
// Sync works like Show(), but it updates every visible cell on the
|
||||
// physical display, assuming that it is not synchronized with any
|
||||
// internal model. This may be both expensive and visually jarring,
|
||||
// so it should only be used when believed to actually be necessary.
|
||||
//
|
||||
// Typically this is called as a result of a user-requested redraw
|
||||
// (e.g. to clear up on screen corruption caused by some other program),
|
||||
// or during a resize event.
|
||||
Sync()
|
||||
|
||||
// CharacterSet returns information about the character set.
|
||||
// This isn't the full locale, but it does give us the input/output
|
||||
// character set. Note that this is just for diagnostic purposes,
|
||||
// we normally translate input/output to/from UTF-8, regardless of
|
||||
// what the user's environment is.
|
||||
CharacterSet() string
|
||||
|
||||
// RegisterRuneFallback adds a fallback for runes that are not
|
||||
// part of the character set -- for example one coudld register
|
||||
// o as a fallback for ø. This should be done cautiously for
|
||||
// characters that might be displayed ordinarily in language
|
||||
// specific text -- characters that could change the meaning of
|
||||
// of written text would be dangerous. The intention here is to
|
||||
// facilitate fallback characters in pseudo-graphical applications.
|
||||
//
|
||||
// If the terminal has fallbacks already in place via an alternate
|
||||
// character set, those are used in preference. Also, standard
|
||||
// fallbacks for graphical characters in the ACSC terminfo string
|
||||
// are registered implicitly.
|
||||
|
||||
// The display string should be the same width as original rune.
|
||||
// This makes it possible to register two character replacements
|
||||
// for full width East Asian characters, for example.
|
||||
//
|
||||
// It is recommended that replacement strings consist only of
|
||||
// 7-bit ASCII, since other characters may not display everywhere.
|
||||
RegisterRuneFallback(r rune, subst string)
|
||||
|
||||
// UnregisterRuneFallback unmaps a replacement. It will unmap
|
||||
// the implicit ASCII replacements for alternate characters as well.
|
||||
// When an unmapped char needs to be displayed, but no suitable
|
||||
// glyph is available, '?' is emitted instead. It is not possible
|
||||
// to "disable" the use of alternate characters that are supported
|
||||
// by your terminal except by changing the terminal database.
|
||||
UnregisterRuneFallback(r rune)
|
||||
|
||||
// CanDisplay returns true if the given rune can be displayed on
|
||||
// this screen. Note that this is a best guess effort -- whether
|
||||
// your fonts support the character or not may be questionable.
|
||||
// Mostly this is for folks who work outside of Unicode.
|
||||
//
|
||||
// If checkFallbacks is true, then if any (possibly imperfect)
|
||||
// fallbacks are registered, this will return true. This will
|
||||
// also return true if the terminal can replace the glyph with
|
||||
// one that is visually indistinguishable from the one requested.
|
||||
CanDisplay(r rune, checkFallbacks bool) bool
|
||||
|
||||
// Resize does nothing, since its generally not possible to
|
||||
// ask a screen to resize, but it allows the Screen to implement
|
||||
// the View interface.
|
||||
Resize(int, int, int, int)
|
||||
|
||||
// HasKey returns true if the keyboard is believed to have the
|
||||
// key. In some cases a keyboard may have keys with this name
|
||||
// but no support for them, while in others a key may be reported
|
||||
// as supported but not actually be usable (such as some emulators
|
||||
// that hijack certain keys). Its best not to depend to strictly
|
||||
// on this function, but it can be used for hinting when building
|
||||
// menus, displayed hot-keys, etc. Note that KeyRune (literal
|
||||
// runes) is always true.
|
||||
HasKey(Key) bool
|
||||
|
||||
SetTitle(string)
|
||||
}
|
||||
|
||||
// NewScreen returns a default Screen suitable for the user's terminal
|
||||
// environment.
|
||||
func NewScreen() (Screen, error) {
|
||||
// First we attempt to obtain a terminfo screen. This should work
|
||||
// in most places if $TERM is set.
|
||||
if s, e := NewTerminfoScreen(); s != nil {
|
||||
return s, nil
|
||||
|
||||
} else if s, _ := NewConsoleScreen(); s != nil {
|
||||
return s, nil
|
||||
|
||||
} else {
|
||||
return nil, e
|
||||
}
|
||||
}
|
510
vendor/maunium.net/go/tcell/simulation.go
generated
vendored
Normal file
510
vendor/maunium.net/go/tcell/simulation.go
generated
vendored
Normal file
@ -0,0 +1,510 @@
|
||||
// Copyright 2016 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/text/transform"
|
||||
)
|
||||
|
||||
// NewSimulationScreen returns a SimulationScreen. Note that
|
||||
// SimulationScreen is also a Screen.
|
||||
func NewSimulationScreen(charset string) SimulationScreen {
|
||||
if charset == "" {
|
||||
charset = "UTF-8"
|
||||
}
|
||||
s := &simscreen{charset: charset}
|
||||
return s
|
||||
}
|
||||
|
||||
// SimulationScreen represents a screen simulation. This is intended to
|
||||
// be a superset of normal Screens, but also adds some important interfaces
|
||||
// for testing.
|
||||
type SimulationScreen interface {
|
||||
// InjectKeyBytes injects a stream of bytes corresponding to
|
||||
// the native encoding (see charset). It turns true if the entire
|
||||
// set of bytes were processed and delivered as KeyEvents, false
|
||||
// if any bytes were not fully understood. Any bytes that are not
|
||||
// fully converted are discarded.
|
||||
InjectKeyBytes(buf []byte) bool
|
||||
|
||||
// InjectKey injects a key event. The rune is a UTF-8 rune, post
|
||||
// any translation.
|
||||
InjectKey(key Key, r rune, mod ModMask)
|
||||
|
||||
// InjectMouse injects a mouse event.
|
||||
InjectMouse(x, y int, buttons ButtonMask, mod ModMask)
|
||||
|
||||
// SetSize resizes the underlying physical screen. It also causes
|
||||
// a resize event to be injected during the next Show() or Sync().
|
||||
// A new physical contents array will be allocated (with data from
|
||||
// the old copied), so any prior value obtained with GetContents
|
||||
// won't be used anymore
|
||||
SetSize(width, height int)
|
||||
|
||||
// GetContents returns screen contents as an array of
|
||||
// cells, along with the physical width & height. Note that the
|
||||
// physical contents will be used until the next time SetSize()
|
||||
// is called.
|
||||
GetContents() (cells []SimCell, width int, height int)
|
||||
|
||||
// GetCursor returns the cursor details.
|
||||
GetCursor() (x int, y int, visible bool)
|
||||
|
||||
Screen
|
||||
}
|
||||
|
||||
// SimCell represents a simulated screen cell. The purpose of this
|
||||
// is to track on screen content.
|
||||
type SimCell struct {
|
||||
// Bytes is the actual character bytes. Normally this is
|
||||
// rune data, but it could be be data in another encoding system.
|
||||
Bytes []byte
|
||||
|
||||
// Style is the style used to display the data.
|
||||
Style Style
|
||||
|
||||
// Runes is the list of runes, unadulterated, in UTF-8.
|
||||
Runes []rune
|
||||
}
|
||||
|
||||
type simscreen struct {
|
||||
physw int
|
||||
physh int
|
||||
fini bool
|
||||
style Style
|
||||
evch chan Event
|
||||
quit chan struct{}
|
||||
|
||||
front []SimCell
|
||||
back CellBuffer
|
||||
clear bool
|
||||
cursorx int
|
||||
cursory int
|
||||
cursorvis bool
|
||||
mouse bool
|
||||
charset string
|
||||
encoder transform.Transformer
|
||||
decoder transform.Transformer
|
||||
fillchar rune
|
||||
fillstyle Style
|
||||
fallback map[rune]string
|
||||
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
func (s *simscreen) Init() error {
|
||||
s.evch = make(chan Event, 10)
|
||||
s.quit = make(chan struct{})
|
||||
s.fillchar = 'X'
|
||||
s.fillstyle = StyleDefault
|
||||
s.mouse = false
|
||||
s.physw = 80
|
||||
s.physh = 25
|
||||
s.cursorx = -1
|
||||
s.cursory = -1
|
||||
s.style = StyleDefault
|
||||
|
||||
if enc := GetEncoding(s.charset); enc != nil {
|
||||
s.encoder = enc.NewEncoder()
|
||||
s.decoder = enc.NewDecoder()
|
||||
} else {
|
||||
return ErrNoCharset
|
||||
}
|
||||
|
||||
s.front = make([]SimCell, s.physw*s.physh)
|
||||
s.back.Resize(80, 25)
|
||||
|
||||
// default fallbacks
|
||||
s.fallback = make(map[rune]string)
|
||||
for k, v := range RuneFallbacks {
|
||||
s.fallback[k] = v
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *simscreen) Fini() {
|
||||
s.Lock()
|
||||
s.fini = true
|
||||
s.back.Resize(0, 0)
|
||||
s.Unlock()
|
||||
if s.quit != nil {
|
||||
close(s.quit)
|
||||
}
|
||||
s.physw = 0
|
||||
s.physh = 0
|
||||
s.front = nil
|
||||
}
|
||||
|
||||
func (s *simscreen) SetStyle(style Style) {
|
||||
s.Lock()
|
||||
s.style = style
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) Clear() {
|
||||
s.Fill(' ', s.style)
|
||||
}
|
||||
|
||||
func (s *simscreen) Fill(r rune, style Style) {
|
||||
s.Lock()
|
||||
s.back.Fill(r, style)
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) SetCell(x, y int, style Style, ch ...rune) {
|
||||
|
||||
if len(ch) > 0 {
|
||||
s.SetContent(x, y, ch[0], ch[1:], style)
|
||||
} else {
|
||||
s.SetContent(x, y, ' ', nil, style)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *simscreen) SetContent(x, y int, mainc rune, combc []rune, st Style) {
|
||||
|
||||
s.Lock()
|
||||
s.back.SetContent(x, y, mainc, combc, st)
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) GetContent(x, y int) (rune, []rune, Style, int) {
|
||||
var mainc rune
|
||||
var combc []rune
|
||||
var style Style
|
||||
var width int
|
||||
s.Lock()
|
||||
mainc, combc, style, width = s.back.GetContent(x, y)
|
||||
s.Unlock()
|
||||
return mainc, combc, style, width
|
||||
}
|
||||
|
||||
func (s *simscreen) drawCell(x, y int) int {
|
||||
|
||||
mainc, combc, style, width := s.back.GetContent(x, y)
|
||||
if !s.back.Dirty(x, y) {
|
||||
return width
|
||||
}
|
||||
if x >= s.physw || y >= s.physh || x < 0 || y < 0 {
|
||||
return width
|
||||
}
|
||||
simc := &s.front[(y*s.physw)+x]
|
||||
|
||||
if style == StyleDefault {
|
||||
style = s.style
|
||||
}
|
||||
simc.Style = style
|
||||
simc.Runes = append([]rune{mainc}, combc...)
|
||||
|
||||
// now emit runes - taking care to not overrun width with a
|
||||
// wide character, and to ensure that we emit exactly one regular
|
||||
// character followed up by any residual combing characters
|
||||
|
||||
simc.Bytes = nil
|
||||
|
||||
if x > s.physw-width {
|
||||
simc.Runes = []rune{' '}
|
||||
simc.Bytes = []byte{' '}
|
||||
return width
|
||||
}
|
||||
|
||||
lbuf := make([]byte, 12)
|
||||
ubuf := make([]byte, 12)
|
||||
nout := 0
|
||||
|
||||
for _, r := range simc.Runes {
|
||||
|
||||
l := utf8.EncodeRune(ubuf, r)
|
||||
|
||||
nout, _, _ = s.encoder.Transform(lbuf, ubuf[:l], true)
|
||||
|
||||
if nout == 0 || lbuf[0] == '\x1a' {
|
||||
|
||||
// skip combining
|
||||
|
||||
if subst, ok := s.fallback[r]; ok {
|
||||
simc.Bytes = append(simc.Bytes,
|
||||
[]byte(subst)...)
|
||||
|
||||
} else if r >= ' ' && r <= '~' {
|
||||
simc.Bytes = append(simc.Bytes, byte(r))
|
||||
|
||||
} else if simc.Bytes == nil {
|
||||
simc.Bytes = append(simc.Bytes, '?')
|
||||
}
|
||||
} else {
|
||||
simc.Bytes = append(simc.Bytes, lbuf[:nout]...)
|
||||
}
|
||||
}
|
||||
s.back.SetDirty(x, y, false)
|
||||
return width
|
||||
}
|
||||
|
||||
func (s *simscreen) ShowCursor(x, y int) {
|
||||
s.Lock()
|
||||
s.cursorx, s.cursory = x, y
|
||||
s.showCursor()
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) HideCursor() {
|
||||
s.ShowCursor(-1, -1)
|
||||
}
|
||||
|
||||
func (s *simscreen) showCursor() {
|
||||
|
||||
x, y := s.cursorx, s.cursory
|
||||
if x < 0 || y < 0 || x >= s.physw || y >= s.physh {
|
||||
s.cursorvis = false
|
||||
} else {
|
||||
s.cursorvis = true
|
||||
}
|
||||
}
|
||||
|
||||
func (s *simscreen) hideCursor() {
|
||||
// does not update cursor position
|
||||
s.cursorvis = false
|
||||
}
|
||||
|
||||
func (s *simscreen) Show() {
|
||||
s.Lock()
|
||||
s.resize()
|
||||
s.draw()
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) clearScreen() {
|
||||
// We emulate a hardware clear by filling with a specific pattern
|
||||
for i := range s.front {
|
||||
s.front[i].Style = s.fillstyle
|
||||
s.front[i].Runes = []rune{s.fillchar}
|
||||
s.front[i].Bytes = []byte{byte(s.fillchar)}
|
||||
}
|
||||
s.clear = false
|
||||
}
|
||||
|
||||
func (s *simscreen) draw() {
|
||||
s.hideCursor()
|
||||
if s.clear {
|
||||
s.clearScreen()
|
||||
}
|
||||
|
||||
w, h := s.back.Size()
|
||||
for y := 0; y < h; y++ {
|
||||
for x := 0; x < w; x++ {
|
||||
width := s.drawCell(x, y)
|
||||
x += width - 1
|
||||
}
|
||||
}
|
||||
s.showCursor()
|
||||
}
|
||||
|
||||
func (s *simscreen) EnableMouse() {
|
||||
s.mouse = true
|
||||
}
|
||||
|
||||
func (s *simscreen) DisableMouse() {
|
||||
s.mouse = false
|
||||
}
|
||||
|
||||
func (s *simscreen) Size() (int, int) {
|
||||
s.Lock()
|
||||
w, h := s.back.Size()
|
||||
s.Unlock()
|
||||
return w, h
|
||||
}
|
||||
|
||||
func (s *simscreen) resize() {
|
||||
w, h := s.physw, s.physh
|
||||
ow, oh := s.back.Size()
|
||||
if w != ow || h != oh {
|
||||
s.back.Resize(w, h)
|
||||
ev := NewEventResize(w, h)
|
||||
s.PostEvent(ev)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *simscreen) Colors() int {
|
||||
return 256
|
||||
}
|
||||
|
||||
func (s *simscreen) PollEvent() Event {
|
||||
select {
|
||||
case <-s.quit:
|
||||
return nil
|
||||
case ev := <-s.evch:
|
||||
return ev
|
||||
}
|
||||
}
|
||||
|
||||
func (s *simscreen) PostEventWait(ev Event) {
|
||||
s.evch <- ev
|
||||
}
|
||||
|
||||
func (s *simscreen) PostEvent(ev Event) error {
|
||||
select {
|
||||
case s.evch <- ev:
|
||||
return nil
|
||||
default:
|
||||
return ErrEventQFull
|
||||
}
|
||||
}
|
||||
|
||||
func (s *simscreen) InjectMouse(x, y int, buttons ButtonMask, mod ModMask) {
|
||||
ev := NewEventMouse(x, y, buttons, mod, false)
|
||||
s.PostEvent(ev)
|
||||
}
|
||||
|
||||
func (s *simscreen) InjectKey(key Key, r rune, mod ModMask) {
|
||||
ev := NewEventKey(key, r, mod)
|
||||
s.PostEvent(ev)
|
||||
}
|
||||
|
||||
func (s *simscreen) InjectKeyBytes(b []byte) bool {
|
||||
failed := false
|
||||
|
||||
outer:
|
||||
for len(b) > 0 {
|
||||
if b[0] >= ' ' && b[0] <= 0x7F {
|
||||
// printable ASCII easy to deal with -- no encodings
|
||||
ev := NewEventKey(KeyRune, rune(b[0]), ModNone)
|
||||
s.PostEvent(ev)
|
||||
b = b[1:]
|
||||
continue
|
||||
}
|
||||
|
||||
if b[0] < 0x80 {
|
||||
mod := ModNone
|
||||
// No encodings start with low numbered values
|
||||
if Key(b[0]) >= KeyCtrlA && Key(b[0]) <= KeyCtrlZ {
|
||||
mod = ModCtrl
|
||||
}
|
||||
ev := NewEventKey(Key(b[0]), 0, mod)
|
||||
s.PostEvent(ev)
|
||||
continue
|
||||
}
|
||||
|
||||
utfb := make([]byte, len(b)*4) // worst case
|
||||
for l := 1; l < len(b); l++ {
|
||||
s.decoder.Reset()
|
||||
nout, nin, _ := s.decoder.Transform(utfb, b[:l], true)
|
||||
|
||||
if nout != 0 {
|
||||
r, _ := utf8.DecodeRune(utfb[:nout])
|
||||
if r != utf8.RuneError {
|
||||
ev := NewEventKey(KeyRune, r, ModNone)
|
||||
s.PostEvent(ev)
|
||||
}
|
||||
b = b[nin:]
|
||||
continue outer
|
||||
}
|
||||
}
|
||||
failed = true
|
||||
b = b[1:]
|
||||
continue
|
||||
}
|
||||
|
||||
return !failed
|
||||
}
|
||||
|
||||
func (s *simscreen) Sync() {
|
||||
s.Lock()
|
||||
s.clear = true
|
||||
s.resize()
|
||||
s.back.Invalidate()
|
||||
s.draw()
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) CharacterSet() string {
|
||||
return s.charset
|
||||
}
|
||||
|
||||
func (s *simscreen) SetSize(w, h int) {
|
||||
s.Lock()
|
||||
newc := make([]SimCell, w*h)
|
||||
for row := 0; row < h && row < s.physh; row++ {
|
||||
for col := 0; col < w && col < s.physw; col++ {
|
||||
newc[(row*w)+col] = s.front[(row*s.physw)+col]
|
||||
}
|
||||
}
|
||||
s.cursorx, s.cursory = -1, -1
|
||||
s.physw, s.physh = w, h
|
||||
s.front = newc
|
||||
s.back.Resize(w, h)
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) GetContents() ([]SimCell, int, int) {
|
||||
s.Lock()
|
||||
cells, w, h := s.front, s.physw, s.physh
|
||||
s.Unlock()
|
||||
return cells, w, h
|
||||
}
|
||||
|
||||
func (s *simscreen) GetCursor() (int, int, bool) {
|
||||
s.Lock()
|
||||
x, y, vis := s.cursorx, s.cursory, s.cursorvis
|
||||
s.Unlock()
|
||||
return x, y, vis
|
||||
}
|
||||
|
||||
func (s *simscreen) RegisterRuneFallback(r rune, subst string) {
|
||||
s.Lock()
|
||||
s.fallback[r] = subst
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) UnregisterRuneFallback(r rune) {
|
||||
s.Lock()
|
||||
delete(s.fallback, r)
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *simscreen) CanDisplay(r rune, checkFallbacks bool) bool {
|
||||
|
||||
if enc := s.encoder; enc != nil {
|
||||
nb := make([]byte, 6)
|
||||
ob := make([]byte, 6)
|
||||
num := utf8.EncodeRune(ob, r)
|
||||
|
||||
enc.Reset()
|
||||
dst, _, err := enc.Transform(nb, ob[:num], true)
|
||||
if dst != 0 && err == nil && nb[0] != '\x1A' {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if !checkFallbacks {
|
||||
return false
|
||||
}
|
||||
if _, ok := s.fallback[r]; ok {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *simscreen) HasMouse() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *simscreen) Resize(int, int, int, int) {}
|
||||
|
||||
func (s *simscreen) HasKey(Key) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *simscreen) SetTitle(title string) {}
|
138
vendor/maunium.net/go/tcell/style.go
generated
vendored
Normal file
138
vendor/maunium.net/go/tcell/style.go
generated
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// Style represents a complete text style, including both foreground
|
||||
// and background color. We encode it in a 64-bit int for efficiency.
|
||||
// The coding is (MSB): <7b flags><1b><24b fgcolor><7b attr><1b><24b bgcolor>.
|
||||
// The <1b> is set true to indicate that the color is an RGB color, rather
|
||||
// than a named index.
|
||||
//
|
||||
// This gives 24bit color options, if it ever becomes truly necessary.
|
||||
// However, applications must not rely on this encoding.
|
||||
//
|
||||
// Note that not all terminals can display all colors or attributes, and
|
||||
// many might have specific incompatibilities between specific attributes
|
||||
// and color combinations.
|
||||
//
|
||||
// The intention is to extend styles to support paletting, in which case
|
||||
// some flag bit(s) would be set, and the foreground and background colors
|
||||
// would be replaced with a palette number and palette index.
|
||||
//
|
||||
// To use Style, just declare a variable of its type.
|
||||
type Style int64
|
||||
|
||||
// StyleDefault represents a default style, based upon the context.
|
||||
// It is the zero value.
|
||||
const StyleDefault Style = 0
|
||||
|
||||
// styleFlags -- used internally for now.
|
||||
const (
|
||||
styleBgSet = 1 << (iota + 57)
|
||||
styleFgSet
|
||||
stylePalette
|
||||
)
|
||||
|
||||
// Foreground returns a new style based on s, with the foreground color set
|
||||
// as requested. ColorDefault can be used to select the global default.
|
||||
func (s Style) Foreground(c Color) Style {
|
||||
if c == ColorDefault {
|
||||
return (s &^ (0x1ffffff00000000 | styleFgSet))
|
||||
}
|
||||
return (s &^ Style(0x1ffffff00000000)) |
|
||||
((Style(c) & 0x1ffffff) << 32) | styleFgSet
|
||||
}
|
||||
|
||||
// Background returns a new style based on s, with the background color set
|
||||
// as requested. ColorDefault can be used to select the global default.
|
||||
func (s Style) Background(c Color) Style {
|
||||
if c == ColorDefault {
|
||||
return (s &^ (0x1ffffff | styleBgSet))
|
||||
}
|
||||
return (s &^ (0x1ffffff)) | (Style(c) & 0x1ffffff) | styleBgSet
|
||||
}
|
||||
|
||||
// Decompose breaks a style up, returning the foreground, background,
|
||||
// and other attributes.
|
||||
func (s Style) Decompose() (fg Color, bg Color, attr AttrMask) {
|
||||
if s&styleFgSet != 0 {
|
||||
fg = Color(s>>32) & 0x1ffffff
|
||||
} else {
|
||||
fg = ColorDefault
|
||||
}
|
||||
if s&styleBgSet != 0 {
|
||||
bg = Color(s & 0x1ffffff)
|
||||
} else {
|
||||
bg = ColorDefault
|
||||
}
|
||||
attr = AttrMask(s) & attrAll
|
||||
|
||||
return fg, bg, attr
|
||||
}
|
||||
|
||||
func (s Style) setAttrs(attrs Style, on bool) Style {
|
||||
if on {
|
||||
return s | attrs
|
||||
}
|
||||
return s &^ attrs
|
||||
}
|
||||
|
||||
// Normal returns the style with all attributes disabled.
|
||||
func (s Style) Normal() Style {
|
||||
return s &^ Style(attrAll)
|
||||
}
|
||||
|
||||
// Bold returns a new style based on s, with the bold attribute set
|
||||
// as requested.
|
||||
func (s Style) Bold(on bool) Style {
|
||||
return s.setAttrs(Style(AttrBold), on)
|
||||
}
|
||||
|
||||
// Italic returns a new style based on s, with the italic attribute set
|
||||
// as requested.
|
||||
func (s Style) Italic(on bool) Style {
|
||||
return s.setAttrs(Style(AttrItalic), on)
|
||||
}
|
||||
|
||||
// Strikethrough returns a new style based on s, with the strikethrough attribute set
|
||||
// as requested.
|
||||
func (s Style) Strikethrough(on bool) Style {
|
||||
return s.setAttrs(Style(AttrStrikethrough), on)
|
||||
}
|
||||
|
||||
// Blink returns a new style based on s, with the blink attribute set
|
||||
// as requested.
|
||||
func (s Style) Blink(on bool) Style {
|
||||
return s.setAttrs(Style(AttrBlink), on)
|
||||
}
|
||||
|
||||
// Dim returns a new style based on s, with the dim attribute set
|
||||
// as requested.
|
||||
func (s Style) Dim(on bool) Style {
|
||||
return s.setAttrs(Style(AttrDim), on)
|
||||
}
|
||||
|
||||
// Reverse returns a new style based on s, with the reverse attribute set
|
||||
// as requested. (Reverse usually changes the foreground and background
|
||||
// colors.)
|
||||
func (s Style) Reverse(on bool) Style {
|
||||
return s.setAttrs(Style(AttrReverse), on)
|
||||
}
|
||||
|
||||
// Underline returns a new style based on s, with the underline attribute set
|
||||
// as requested.
|
||||
func (s Style) Underline(on bool) Style {
|
||||
return s.setAttrs(Style(AttrUnderline), on)
|
||||
}
|
BIN
vendor/maunium.net/go/tcell/tcell.png
generated
vendored
Normal file
BIN
vendor/maunium.net/go/tcell/tcell.png
generated
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
93
vendor/maunium.net/go/tcell/tcell.svg
generated
vendored
Normal file
93
vendor/maunium.net/go/tcell/tcell.svg
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 210 297"
|
||||
height="297mm"
|
||||
width="210mm">
|
||||
<defs
|
||||
id="defs2">
|
||||
<linearGradient
|
||||
id="linearGradient2680">
|
||||
<stop
|
||||
id="stop2676"
|
||||
offset="0"
|
||||
style="stop-color:#ababab;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop2678"
|
||||
offset="1"
|
||||
style="stop-color:#ababab;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Lstart"
|
||||
refX="0.0"
|
||||
refY="0.0"
|
||||
orient="auto">
|
||||
<path
|
||||
transform="scale(0.8) translate(12.5,0)"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
|
||||
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
|
||||
id="path848" />
|
||||
</marker>
|
||||
<radialGradient
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.28804762,0,94.764912)"
|
||||
r="19.622099"
|
||||
fy="133.10568"
|
||||
fx="111.58373"
|
||||
cy="133.10568"
|
||||
cx="111.58373"
|
||||
id="radialGradient2684"
|
||||
xlink:href="#linearGradient2680" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
y="99.44445"
|
||||
x="31.750006"
|
||||
height="86.430557"
|
||||
width="129.64584"
|
||||
id="rect1130"
|
||||
style="opacity:1;fill:#5d6c53;fill-opacity:1;stroke:#244f24;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<text
|
||||
transform="scale(0.99941234,1.000588)"
|
||||
id="text1128"
|
||||
y="160.47581"
|
||||
x="44.689861"
|
||||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:46.0962944px;line-height:1.25;font-family:'Glass TTY VT220';-inkscape-font-specification:'Glass TTY VT220, Medium';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#5ef86d;fill-opacity:1;stroke:#59ff32;stroke-width:0.80994618;stroke-opacity:0.94520545;"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:46.0962944px;font-family:'Glass TTY VT220';-inkscape-font-specification:'Glass TTY VT220, Medium';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#5ef86d;fill-opacity:1;stroke:#59ff32;stroke-width:0.80994618;stroke-opacity:0.94520545;"
|
||||
y="160.47581"
|
||||
x="44.689861"
|
||||
id="tspan1126">tcell</tspan></text>
|
||||
<flowRoot
|
||||
style="fill:black;fill-opacity:1;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;letter-spacing:0px;word-spacing:0px"
|
||||
id="flowRoot1132"
|
||||
xml:space="preserve"><flowRegion
|
||||
id="flowRegion1134"><rect
|
||||
y="432.51968"
|
||||
x="290"
|
||||
height="160"
|
||||
width="330"
|
||||
id="rect1136" /></flowRegion><flowPara
|
||||
id="flowPara1138"></flowPara></flowRoot> </g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.7 KiB |
1
vendor/maunium.net/go/tcell/terminfo/.gitignore
generated
vendored
Normal file
1
vendor/maunium.net/go/tcell/terminfo/.gitignore
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
mkinfo
|
7
vendor/maunium.net/go/tcell/terminfo/TERMINALS.md
generated
vendored
Normal file
7
vendor/maunium.net/go/tcell/terminfo/TERMINALS.md
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
TERMINALS
|
||||
=========
|
||||
|
||||
The best way to populate terminals on Debian is to install ncurses,
|
||||
ncurses-term, screen, tmux, rxvt-unicode, and dvtm. This populates the
|
||||
the terminfo database so that we can have a reasonable set of starting
|
||||
terminals.
|
189
vendor/maunium.net/go/tcell/terminfo/mkdatabase.sh
generated
vendored
Executable file
189
vendor/maunium.net/go/tcell/terminfo/mkdatabase.sh
generated
vendored
Executable file
@ -0,0 +1,189 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The TCell Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use file except in compliance with the License.
|
||||
# You may obtain a copy of the license at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#
|
||||
# When called with no arguments, this shell script builds the Go database,
|
||||
# which is somewhat minimal for size reasons (it only contains the most
|
||||
# commonly used entries), and then builds the complete JSON database.
|
||||
#
|
||||
# To limit the action to only building one or more terminals, specify them
|
||||
# on the command line:
|
||||
#
|
||||
# ./mkdatabase xterm
|
||||
#
|
||||
# The script will also find and update or add any terminal "aliases".
|
||||
# It does not remove any old entries.
|
||||
#
|
||||
# To add to the set of terminals that we compile into the Go database,
|
||||
# add their names to the models.txt file.
|
||||
#
|
||||
|
||||
# This script is not very efficient, but there isn't really a better way
|
||||
# without writing code to decode the terminfo binary format directly.
|
||||
# Its not worth worrying about.
|
||||
|
||||
# This script also requires bash, although ksh93 should work as well, because
|
||||
# we use arrays, which are not specified in POSIX.
|
||||
|
||||
export LANG=C
|
||||
export LC_CTYPE=C
|
||||
|
||||
progress()
|
||||
{
|
||||
typeset -i num=$1
|
||||
typeset -i tot=$2
|
||||
typeset -i x
|
||||
typeset back
|
||||
typeset s
|
||||
|
||||
if (( tot < 1 ))
|
||||
then
|
||||
s=$(printf "[ %d ]" $num)
|
||||
back="\b\b\b\b\b"
|
||||
x=$num
|
||||
while (( x >= 10 ))
|
||||
do
|
||||
back="${back}\b"
|
||||
x=$(( x / 10 ))
|
||||
done
|
||||
|
||||
else
|
||||
x=$(( num * 100 / tot ))
|
||||
s=$(printf "<%3d%%>" $x)
|
||||
back="\b\b\b\b\b\b"
|
||||
fi
|
||||
printf "%s${back}" "$s"
|
||||
}
|
||||
|
||||
ord()
|
||||
{
|
||||
printf "%02x" "'$1'"
|
||||
}
|
||||
|
||||
goterms=( $(cat models.txt) )
|
||||
args=( $* )
|
||||
if (( ${#args[@]} == 0 ))
|
||||
then
|
||||
args=( $(toe -a | cut -f1) )
|
||||
fi
|
||||
|
||||
printf "Scanning terminal definitions: "
|
||||
i=0
|
||||
aliases=()
|
||||
models=()
|
||||
for term in ${args[@]}
|
||||
do
|
||||
case "${term}" in
|
||||
*-truecolor)
|
||||
line="${term}|24-bit color"
|
||||
;;
|
||||
*)
|
||||
line=$(infocmp $term | head -2 | tail -1)
|
||||
if [[ -z "$line" ]]
|
||||
then
|
||||
echo "Cannot find terminfo for $term"
|
||||
exit 1
|
||||
fi
|
||||
# take off the trailing comma
|
||||
line=${line%,}
|
||||
esac
|
||||
|
||||
# grab primary name
|
||||
term=${line%%|*}
|
||||
all+=( ${term} )
|
||||
|
||||
# should this be in our go terminals?
|
||||
for model in ${goterms[@]}
|
||||
do
|
||||
if [[ "${model}" == "${term}" ]]
|
||||
then
|
||||
models+=( ${term} )
|
||||
fi
|
||||
done
|
||||
|
||||
# chop off primary name
|
||||
line=${line#${term}}
|
||||
line=${line#|}
|
||||
# chop off description
|
||||
line=${line%|*}
|
||||
while [[ "$line" != "" ]]
|
||||
do
|
||||
a=${line%%|*}
|
||||
aliases+=( ${a}=${term} )
|
||||
line=${line#$a}
|
||||
line=${line#|}
|
||||
done
|
||||
i=$(( i + 1 ))
|
||||
progress $i ${#args[@]}
|
||||
done
|
||||
echo
|
||||
# make sure we have mkinfo
|
||||
printf "Building mkinfo: "
|
||||
go build mkinfo.go
|
||||
echo "done."
|
||||
|
||||
# Build all the go database files for the "interesting" terminals".
|
||||
printf "Building Go database: "
|
||||
i=0
|
||||
for model in ${models[@]}
|
||||
do
|
||||
safe=$(echo $model | tr - _)
|
||||
file=term_${safe}.go
|
||||
./mkinfo -go $file $model
|
||||
go fmt ${file} >/dev/null
|
||||
i=$(( i + 1 ))
|
||||
progress $i ${#models[@]}
|
||||
done
|
||||
echo
|
||||
|
||||
printf "Building JSON database: "
|
||||
|
||||
# The JSON files are located for each terminal in a file with the
|
||||
# terminal name, in the following fashion "database/x/xterm.json
|
||||
|
||||
i=0
|
||||
for model in ${all[@]}
|
||||
do
|
||||
letter=$(ord ${model:0:1})
|
||||
dir=database/${letter}
|
||||
file=${dir}/${model}.gz
|
||||
mkdir -p ${dir}
|
||||
./mkinfo -nofatal -quiet -gzip -json ${file} ${model}
|
||||
i=$(( i + 1 ))
|
||||
progress $i ${#all[@]}
|
||||
done
|
||||
echo
|
||||
|
||||
printf "Building JSON aliases: "
|
||||
i=0
|
||||
for model in ${aliases[@]}
|
||||
do
|
||||
canon=${model#*=}
|
||||
model=${model%=*}
|
||||
letter=$(ord ${model:0:1})
|
||||
cletter=$(ord ${canon:0:1})
|
||||
dir=database/${letter}
|
||||
file=${dir}/${model}
|
||||
if [[ -f database/${cletter}/${canon}.gz ]]
|
||||
then
|
||||
[[ -d ${dir} ]] || mkdir -p ${dir}
|
||||
# Generally speaking the aliases are better uncompressed
|
||||
./mkinfo -nofatal -quiet -json ${file} ${model}
|
||||
fi
|
||||
i=$(( i + 1 ))
|
||||
progress $i ${#aliases[@]}
|
||||
done
|
||||
echo
|
781
vendor/maunium.net/go/tcell/terminfo/mkinfo.go
generated
vendored
Normal file
781
vendor/maunium.net/go/tcell/terminfo/mkinfo.go
generated
vendored
Normal file
@ -0,0 +1,781 @@
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2017 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This command is used to generate suitable configuration files in either
|
||||
// go syntax or in JSON. It defaults to JSON output on stdout. If no
|
||||
// term values are specified on the command line, then $TERM is used.
|
||||
//
|
||||
// Usage is like this:
|
||||
//
|
||||
// mkinfo [-init] [-go file.go] [-json file.json] [-quiet] [-nofatal] [<term>...]
|
||||
//
|
||||
// -gzip specifies output should be compressed (json only)
|
||||
// -go specifies Go output into the named file. Use - for stdout.
|
||||
// -json specifies JSON output in the named file. Use - for stdout
|
||||
// -nofatal indicates that errors loading definitions should not be fatal
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"maunium.net/go/tcell/terminfo"
|
||||
)
|
||||
|
||||
type termcap struct {
|
||||
name string
|
||||
desc string
|
||||
aliases []string
|
||||
bools map[string]bool
|
||||
nums map[string]int
|
||||
strs map[string]string
|
||||
}
|
||||
|
||||
func (tc *termcap) getnum(s string) int {
|
||||
return (tc.nums[s])
|
||||
}
|
||||
|
||||
func (tc *termcap) getflag(s string) bool {
|
||||
return (tc.bools[s])
|
||||
}
|
||||
|
||||
func (tc *termcap) getstr(s string) string {
|
||||
return (tc.strs[s])
|
||||
}
|
||||
|
||||
const (
|
||||
NONE = iota
|
||||
CTRL
|
||||
ESC
|
||||
)
|
||||
|
||||
func unescape(s string) string {
|
||||
// Various escapes are in \x format. Control codes are
|
||||
// encoded as ^M (carat followed by ASCII equivalent).
|
||||
// Escapes are: \e, \E - escape
|
||||
// \0 NULL, \n \l \r \t \b \f \s for equivalent C escape.
|
||||
buf := &bytes.Buffer{}
|
||||
esc := NONE
|
||||
|
||||
for i := 0; i < len(s); i++ {
|
||||
c := s[i]
|
||||
switch esc {
|
||||
case NONE:
|
||||
switch c {
|
||||
case '\\':
|
||||
esc = ESC
|
||||
case '^':
|
||||
esc = CTRL
|
||||
default:
|
||||
buf.WriteByte(c)
|
||||
}
|
||||
case CTRL:
|
||||
buf.WriteByte(c - 0x40)
|
||||
esc = NONE
|
||||
case ESC:
|
||||
switch c {
|
||||
case 'E', 'e':
|
||||
buf.WriteByte(0x1b)
|
||||
case '0', '1', '2', '3', '4', '5', '6', '7':
|
||||
if i+2 < len(s) && s[i+1] >= '0' && s[i+1] <= '7' && s[i+2] >= '0' && s[i+2] <= '7' {
|
||||
buf.WriteByte(((c - '0') * 64) + ((s[i+1] - '0') * 8) + (s[i+2] - '0'))
|
||||
i = i + 2
|
||||
} else if c == '0' {
|
||||
buf.WriteByte(0)
|
||||
}
|
||||
case 'n':
|
||||
buf.WriteByte('\n')
|
||||
case 'r':
|
||||
buf.WriteByte('\r')
|
||||
case 't':
|
||||
buf.WriteByte('\t')
|
||||
case 'b':
|
||||
buf.WriteByte('\b')
|
||||
case 'f':
|
||||
buf.WriteByte('\f')
|
||||
case 's':
|
||||
buf.WriteByte(' ')
|
||||
case 'l':
|
||||
panic("WTF: weird format: " + s)
|
||||
default:
|
||||
buf.WriteByte(c)
|
||||
}
|
||||
esc = NONE
|
||||
}
|
||||
}
|
||||
return (buf.String())
|
||||
}
|
||||
|
||||
func (tc *termcap) setupterm(name string) error {
|
||||
cmd := exec.Command("infocmp", "-1", name)
|
||||
output := &bytes.Buffer{}
|
||||
cmd.Stdout = output
|
||||
|
||||
tc.strs = make(map[string]string)
|
||||
tc.bools = make(map[string]bool)
|
||||
tc.nums = make(map[string]int)
|
||||
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Now parse the output.
|
||||
// We get comment lines (starting with "#"), followed by
|
||||
// a header line that looks like "<name>|<alias>|...|<desc>"
|
||||
// then capabilities, one per line, starting with a tab and ending
|
||||
// with a comma and newline.
|
||||
lines := strings.Split(output.String(), "\n")
|
||||
for len(lines) > 0 && strings.HasPrefix(lines[0], "#") {
|
||||
lines = lines[1:]
|
||||
}
|
||||
|
||||
// Ditch trailing empty last line
|
||||
if lines[len(lines)-1] == "" {
|
||||
lines = lines[:len(lines)-1]
|
||||
}
|
||||
header := lines[0]
|
||||
if strings.HasSuffix(header, ",") {
|
||||
header = header[:len(header)-1]
|
||||
}
|
||||
names := strings.Split(header, "|")
|
||||
tc.name = names[0]
|
||||
names = names[1:]
|
||||
if len(names) > 0 {
|
||||
tc.desc = names[len(names)-1]
|
||||
names = names[:len(names)-1]
|
||||
}
|
||||
tc.aliases = names
|
||||
for _, val := range lines[1:] {
|
||||
if (!strings.HasPrefix(val, "\t")) ||
|
||||
(!strings.HasSuffix(val, ",")) {
|
||||
return (errors.New("malformed infocmp: " + val))
|
||||
}
|
||||
|
||||
val = val[1:]
|
||||
val = val[:len(val)-1]
|
||||
|
||||
if k := strings.SplitN(val, "=", 2); len(k) == 2 {
|
||||
tc.strs[k[0]] = unescape(k[1])
|
||||
} else if k := strings.SplitN(val, "#", 2); len(k) == 2 {
|
||||
if u, err := strconv.ParseUint(k[1], 10, 0); err != nil {
|
||||
return (err)
|
||||
} else {
|
||||
tc.nums[k[0]] = int(u)
|
||||
}
|
||||
} else {
|
||||
tc.bools[val] = true
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// This program is used to collect data from the system's terminfo library,
|
||||
// and write it into Go source code. That is, we maintain our terminfo
|
||||
// capabilities encoded in the program. It should never need to be run by
|
||||
// an end user, but developers can use this to add codes for additional
|
||||
// terminal types.
|
||||
//
|
||||
// If a terminal name ending with -truecolor is given, and we cannot find
|
||||
// one, we will try to fabricate one from either the -256color (if present)
|
||||
// or the unadorned base name, adding the XTerm specific 24-bit color
|
||||
// escapes. We believe that all 24-bit capable terminals use the same
|
||||
// escape sequences, and terminfo has yet to evolve to support this.
|
||||
func getinfo(name string) (*terminfo.Terminfo, string, error) {
|
||||
var tc termcap
|
||||
addTrueColor := false
|
||||
if err := tc.setupterm(name); err != nil {
|
||||
if strings.HasSuffix(name, "-truecolor") {
|
||||
base := name[:len(name)-len("-truecolor")]
|
||||
// Probably -256color is closest to what we want
|
||||
if err = tc.setupterm(base + "-256color"); err != nil {
|
||||
err = tc.setupterm(base)
|
||||
}
|
||||
if err == nil {
|
||||
addTrueColor = true
|
||||
}
|
||||
tc.name = name
|
||||
}
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
}
|
||||
t := &terminfo.Terminfo{}
|
||||
// If this is an alias record, then just emit the alias
|
||||
t.Name = tc.name
|
||||
if t.Name != name {
|
||||
return t, "", nil
|
||||
}
|
||||
t.Aliases = tc.aliases
|
||||
t.Colors = tc.getnum("colors")
|
||||
t.Columns = tc.getnum("cols")
|
||||
t.Lines = tc.getnum("lines")
|
||||
t.Bell = tc.getstr("bel")
|
||||
t.Clear = tc.getstr("clear")
|
||||
t.EnterCA = tc.getstr("smcup")
|
||||
t.ExitCA = tc.getstr("rmcup")
|
||||
t.ShowCursor = tc.getstr("cnorm")
|
||||
t.HideCursor = tc.getstr("civis")
|
||||
t.AttrOff = tc.getstr("sgr0")
|
||||
t.Underline = tc.getstr("smul")
|
||||
t.Bold = tc.getstr("bold")
|
||||
t.Italic = tc.getstr("sitm")
|
||||
if len(t.Italic) == 0 {
|
||||
t.Italic = "\x1b[3m"
|
||||
}
|
||||
t.Strikethrough = "\x1b[9m"
|
||||
t.Blink = tc.getstr("blink")
|
||||
t.Dim = tc.getstr("dim")
|
||||
t.Reverse = tc.getstr("rev")
|
||||
t.EnterKeypad = tc.getstr("smkx")
|
||||
t.ExitKeypad = tc.getstr("rmkx")
|
||||
t.SetFg = tc.getstr("setaf")
|
||||
t.SetBg = tc.getstr("setab")
|
||||
t.SetCursor = tc.getstr("cup")
|
||||
t.CursorBack1 = tc.getstr("cub1")
|
||||
t.CursorUp1 = tc.getstr("cuu1")
|
||||
t.KeyF1 = tc.getstr("kf1")
|
||||
t.KeyF2 = tc.getstr("kf2")
|
||||
t.KeyF3 = tc.getstr("kf3")
|
||||
t.KeyF4 = tc.getstr("kf4")
|
||||
t.KeyF5 = tc.getstr("kf5")
|
||||
t.KeyF6 = tc.getstr("kf6")
|
||||
t.KeyF7 = tc.getstr("kf7")
|
||||
t.KeyF8 = tc.getstr("kf8")
|
||||
t.KeyF9 = tc.getstr("kf9")
|
||||
t.KeyF10 = tc.getstr("kf10")
|
||||
t.KeyF11 = tc.getstr("kf11")
|
||||
t.KeyF12 = tc.getstr("kf12")
|
||||
t.KeyF13 = tc.getstr("kf13")
|
||||
t.KeyF14 = tc.getstr("kf14")
|
||||
t.KeyF15 = tc.getstr("kf15")
|
||||
t.KeyF16 = tc.getstr("kf16")
|
||||
t.KeyF17 = tc.getstr("kf17")
|
||||
t.KeyF18 = tc.getstr("kf18")
|
||||
t.KeyF19 = tc.getstr("kf19")
|
||||
t.KeyF20 = tc.getstr("kf20")
|
||||
t.KeyF21 = tc.getstr("kf21")
|
||||
t.KeyF22 = tc.getstr("kf22")
|
||||
t.KeyF23 = tc.getstr("kf23")
|
||||
t.KeyF24 = tc.getstr("kf24")
|
||||
t.KeyF25 = tc.getstr("kf25")
|
||||
t.KeyF26 = tc.getstr("kf26")
|
||||
t.KeyF27 = tc.getstr("kf27")
|
||||
t.KeyF28 = tc.getstr("kf28")
|
||||
t.KeyF29 = tc.getstr("kf29")
|
||||
t.KeyF30 = tc.getstr("kf30")
|
||||
t.KeyF31 = tc.getstr("kf31")
|
||||
t.KeyF32 = tc.getstr("kf32")
|
||||
t.KeyF33 = tc.getstr("kf33")
|
||||
t.KeyF34 = tc.getstr("kf34")
|
||||
t.KeyF35 = tc.getstr("kf35")
|
||||
t.KeyF36 = tc.getstr("kf36")
|
||||
t.KeyF37 = tc.getstr("kf37")
|
||||
t.KeyF38 = tc.getstr("kf38")
|
||||
t.KeyF39 = tc.getstr("kf39")
|
||||
t.KeyF40 = tc.getstr("kf40")
|
||||
t.KeyF41 = tc.getstr("kf41")
|
||||
t.KeyF42 = tc.getstr("kf42")
|
||||
t.KeyF43 = tc.getstr("kf43")
|
||||
t.KeyF44 = tc.getstr("kf44")
|
||||
t.KeyF45 = tc.getstr("kf45")
|
||||
t.KeyF46 = tc.getstr("kf46")
|
||||
t.KeyF47 = tc.getstr("kf47")
|
||||
t.KeyF48 = tc.getstr("kf48")
|
||||
t.KeyF49 = tc.getstr("kf49")
|
||||
t.KeyF50 = tc.getstr("kf50")
|
||||
t.KeyF51 = tc.getstr("kf51")
|
||||
t.KeyF52 = tc.getstr("kf52")
|
||||
t.KeyF53 = tc.getstr("kf53")
|
||||
t.KeyF54 = tc.getstr("kf54")
|
||||
t.KeyF55 = tc.getstr("kf55")
|
||||
t.KeyF56 = tc.getstr("kf56")
|
||||
t.KeyF57 = tc.getstr("kf57")
|
||||
t.KeyF58 = tc.getstr("kf58")
|
||||
t.KeyF59 = tc.getstr("kf59")
|
||||
t.KeyF60 = tc.getstr("kf60")
|
||||
t.KeyF61 = tc.getstr("kf61")
|
||||
t.KeyF62 = tc.getstr("kf62")
|
||||
t.KeyF63 = tc.getstr("kf63")
|
||||
t.KeyF64 = tc.getstr("kf64")
|
||||
t.KeyInsert = tc.getstr("kich1")
|
||||
t.KeyDelete = tc.getstr("kdch1")
|
||||
t.KeyBackspace = tc.getstr("kbs")
|
||||
t.KeyHome = tc.getstr("khome")
|
||||
t.KeyEnd = tc.getstr("kend")
|
||||
t.KeyUp = tc.getstr("kcuu1")
|
||||
t.KeyDown = tc.getstr("kcud1")
|
||||
t.KeyRight = tc.getstr("kcuf1")
|
||||
t.KeyLeft = tc.getstr("kcub1")
|
||||
t.KeyPgDn = tc.getstr("knp")
|
||||
t.KeyPgUp = tc.getstr("kpp")
|
||||
t.KeyBacktab = tc.getstr("kcbt")
|
||||
t.KeyExit = tc.getstr("kext")
|
||||
t.KeyCancel = tc.getstr("kcan")
|
||||
t.KeyPrint = tc.getstr("kprt")
|
||||
t.KeyHelp = tc.getstr("khlp")
|
||||
t.KeyClear = tc.getstr("kclr")
|
||||
t.AltChars = tc.getstr("acsc")
|
||||
t.EnterAcs = tc.getstr("smacs")
|
||||
t.ExitAcs = tc.getstr("rmacs")
|
||||
t.EnableAcs = tc.getstr("enacs")
|
||||
t.Mouse = tc.getstr("kmous")
|
||||
t.KeyShfRight = tc.getstr("kRIT")
|
||||
t.KeyShfLeft = tc.getstr("kLFT")
|
||||
t.KeyShfHome = tc.getstr("kHOM")
|
||||
t.KeyShfEnd = tc.getstr("kEND")
|
||||
|
||||
// Terminfo lacks descriptions for a bunch of modified keys,
|
||||
// but modern XTerm and emulators often have them. Let's add them,
|
||||
// if the shifted right and left arrows are defined.
|
||||
if t.KeyShfRight == "\x1b[1;2C" && t.KeyShfLeft == "\x1b[1;2D" {
|
||||
t.KeyShfUp = "\x1b[1;2A"
|
||||
t.KeyShfDown = "\x1b[1;2B"
|
||||
t.KeyMetaUp = "\x1b[1;9A"
|
||||
t.KeyMetaDown = "\x1b[1;9B"
|
||||
t.KeyMetaRight = "\x1b[1;9C"
|
||||
t.KeyMetaLeft = "\x1b[1;9D"
|
||||
t.KeyAltUp = "\x1b[1;3A"
|
||||
t.KeyAltDown = "\x1b[1;3B"
|
||||
t.KeyAltRight = "\x1b[1;3C"
|
||||
t.KeyAltLeft = "\x1b[1;3D"
|
||||
t.KeyCtrlUp = "\x1b[1;5A"
|
||||
t.KeyCtrlDown = "\x1b[1;5B"
|
||||
t.KeyCtrlRight = "\x1b[1;5C"
|
||||
t.KeyCtrlLeft = "\x1b[1;5D"
|
||||
t.KeyAltShfUp = "\x1b[1;4A"
|
||||
t.KeyAltShfDown = "\x1b[1;4B"
|
||||
t.KeyAltShfRight = "\x1b[1;4C"
|
||||
t.KeyAltShfLeft = "\x1b[1;4D"
|
||||
|
||||
t.KeyMetaShfUp = "\x1b[1;10A"
|
||||
t.KeyMetaShfDown = "\x1b[1;10B"
|
||||
t.KeyMetaShfRight = "\x1b[1;10C"
|
||||
t.KeyMetaShfLeft = "\x1b[1;10D"
|
||||
|
||||
t.KeyCtrlShfUp = "\x1b[1;6A"
|
||||
t.KeyCtrlShfDown = "\x1b[1;6B"
|
||||
t.KeyCtrlShfRight = "\x1b[1;6C"
|
||||
t.KeyCtrlShfLeft = "\x1b[1;6D"
|
||||
}
|
||||
// And also for Home and End
|
||||
if t.KeyShfHome == "\x1b[1;2H" && t.KeyShfEnd == "\x1b[1;2F" {
|
||||
t.KeyCtrlHome = "\x1b[1;5H"
|
||||
t.KeyCtrlEnd = "\x1b[1;5F"
|
||||
t.KeyAltHome = "\x1b[1;9H"
|
||||
t.KeyAltEnd = "\x1b[1;9F"
|
||||
t.KeyCtrlShfHome = "\x1b[1;6H"
|
||||
t.KeyCtrlShfEnd = "\x1b[1;6F"
|
||||
t.KeyAltShfHome = "\x1b[1;4H"
|
||||
t.KeyAltShfEnd = "\x1b[1;4F"
|
||||
t.KeyMetaShfHome = "\x1b[1;10H"
|
||||
t.KeyMetaShfEnd = "\x1b[1;10F"
|
||||
}
|
||||
|
||||
// And the same thing for rxvt and workalikes (Eterm, aterm, etc.)
|
||||
// It seems that urxvt at least send ESC as ALT prefix for these,
|
||||
// although some places seem to indicate a separate ALT key sesquence.
|
||||
if t.KeyShfRight == "\x1b[c" && t.KeyShfLeft == "\x1b[d" {
|
||||
t.KeyShfUp = "\x1b[a"
|
||||
t.KeyShfDown = "\x1b[b"
|
||||
t.KeyCtrlUp = "\x1b[Oa"
|
||||
t.KeyCtrlDown = "\x1b[Ob"
|
||||
t.KeyCtrlRight = "\x1b[Oc"
|
||||
t.KeyCtrlLeft = "\x1b[Od"
|
||||
}
|
||||
if t.KeyShfHome == "\x1b[7$" && t.KeyShfEnd == "\x1b[8$" {
|
||||
t.KeyCtrlHome = "\x1b[7^"
|
||||
t.KeyCtrlEnd = "\x1b[8^"
|
||||
}
|
||||
|
||||
// If the kmous entry is present, then we need to record the
|
||||
// the codes to enter and exit mouse mode. Sadly, this is not
|
||||
// part of the terminfo databases anywhere that I've found, but
|
||||
// is an extension. The escape codes are documented in the XTerm
|
||||
// manual, and all terminals that have kmous are expected to
|
||||
// use these same codes, unless explicitly configured otherwise
|
||||
// vi XM. Note that in any event, we only known how to parse either
|
||||
// x11 or SGR mouse events -- if your terminal doesn't support one
|
||||
// of these two forms, you maybe out of luck.
|
||||
t.MouseMode = tc.getstr("XM")
|
||||
if t.Mouse != "" && t.MouseMode == "" {
|
||||
// we anticipate that all xterm mouse tracking compatible
|
||||
// terminals understand mouse tracking (1000), but we hope
|
||||
// that those that don't understand any-event tracking (1003)
|
||||
// will at least ignore it. Likewise we hope that terminals
|
||||
// that don't understand SGR reporting (1006) just ignore it.
|
||||
t.MouseMode = "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;" +
|
||||
"\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c"
|
||||
}
|
||||
|
||||
// We only support colors in ANSI 8 or 256 color mode.
|
||||
if t.Colors < 8 || t.SetFg == "" {
|
||||
t.Colors = 0
|
||||
}
|
||||
if t.SetCursor == "" {
|
||||
return nil, "", errors.New("terminal not cursor addressable")
|
||||
}
|
||||
|
||||
// For padding, we lookup the pad char. If that isn't present,
|
||||
// and npc is *not* set, then we assume a null byte.
|
||||
t.PadChar = tc.getstr("pad")
|
||||
if t.PadChar == "" {
|
||||
if !tc.getflag("npc") {
|
||||
t.PadChar = "\u0000"
|
||||
}
|
||||
}
|
||||
|
||||
// For some terminals we fabricate a -truecolor entry, that may
|
||||
// not exist in terminfo.
|
||||
if addTrueColor {
|
||||
t.SetFgRGB = "\x1b[38;2;%p1%d;%p2%d;%p3%dm"
|
||||
t.SetBgRGB = "\x1b[48;2;%p1%d;%p2%d;%p3%dm"
|
||||
t.SetFgBgRGB = "\x1b[38;2;%p1%d;%p2%d;%p3%d;" +
|
||||
"48;2;%p4%d;%p5%d;%p6%dm"
|
||||
}
|
||||
|
||||
// For terminals that use "standard" SGR sequences, lets combine the
|
||||
// foreground and background together.
|
||||
if strings.HasPrefix(t.SetFg, "\x1b[") &&
|
||||
strings.HasPrefix(t.SetBg, "\x1b[") &&
|
||||
strings.HasSuffix(t.SetFg, "m") &&
|
||||
strings.HasSuffix(t.SetBg, "m") {
|
||||
fg := t.SetFg[:len(t.SetFg)-1]
|
||||
r := regexp.MustCompile("%p1")
|
||||
bg := r.ReplaceAllString(t.SetBg[2:], "%p2")
|
||||
t.SetFgBg = fg + ";" + bg
|
||||
}
|
||||
|
||||
return t, tc.desc, nil
|
||||
}
|
||||
|
||||
func dotGoAddInt(w io.Writer, n string, i int) {
|
||||
if i == 0 {
|
||||
// initialized to 0, ignore
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(w, "\t\t%-13s %d,\n", n+":", i)
|
||||
}
|
||||
func dotGoAddStr(w io.Writer, n string, s string) {
|
||||
if s == "" {
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(w, "\t\t%-13s %q,\n", n+":", s)
|
||||
}
|
||||
|
||||
func dotGoAddArr(w io.Writer, n string, a []string) {
|
||||
if len(a) == 0 {
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(w, "\t\t%-13s []string{", n+":")
|
||||
did := false
|
||||
for _, b := range a {
|
||||
if did {
|
||||
fmt.Fprint(w, ", ")
|
||||
}
|
||||
did = true
|
||||
fmt.Fprintf(w, "%q", b)
|
||||
}
|
||||
fmt.Fprintln(w, "},")
|
||||
}
|
||||
|
||||
func dotGoHeader(w io.Writer, packname string) {
|
||||
fmt.Fprintln(w, "// Generated automatically. DO NOT HAND-EDIT.")
|
||||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintf(w, "package %s\n", packname)
|
||||
fmt.Fprintln(w, "")
|
||||
}
|
||||
|
||||
func dotGoTrailer(w io.Writer) {
|
||||
}
|
||||
|
||||
func dotGoInfo(w io.Writer, t *terminfo.Terminfo, desc string) {
|
||||
|
||||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintln(w, "func init() {")
|
||||
fmt.Fprintf(w, "\t// %s\n", desc)
|
||||
fmt.Fprintln(w, "\tAddTerminfo(&Terminfo{")
|
||||
dotGoAddStr(w, "Name", t.Name)
|
||||
dotGoAddArr(w, "Aliases", t.Aliases)
|
||||
dotGoAddInt(w, "Columns", t.Columns)
|
||||
dotGoAddInt(w, "Lines", t.Lines)
|
||||
dotGoAddInt(w, "Colors", t.Colors)
|
||||
dotGoAddStr(w, "Bell", t.Bell)
|
||||
dotGoAddStr(w, "Clear", t.Clear)
|
||||
dotGoAddStr(w, "EnterCA", t.EnterCA)
|
||||
dotGoAddStr(w, "ExitCA", t.ExitCA)
|
||||
dotGoAddStr(w, "ShowCursor", t.ShowCursor)
|
||||
dotGoAddStr(w, "HideCursor", t.HideCursor)
|
||||
dotGoAddStr(w, "AttrOff", t.AttrOff)
|
||||
dotGoAddStr(w, "Underline", t.Underline)
|
||||
dotGoAddStr(w, "Bold", t.Bold)
|
||||
dotGoAddStr(w, "Italic", t.Italic)
|
||||
dotGoAddStr(w, "Strikethrough", "\x1b[9m")
|
||||
dotGoAddStr(w, "Dim", t.Dim)
|
||||
dotGoAddStr(w, "Blink", t.Blink)
|
||||
dotGoAddStr(w, "Reverse", t.Reverse)
|
||||
dotGoAddStr(w, "EnterKeypad", t.EnterKeypad)
|
||||
dotGoAddStr(w, "ExitKeypad", t.ExitKeypad)
|
||||
dotGoAddStr(w, "SetFg", t.SetFg)
|
||||
dotGoAddStr(w, "SetBg", t.SetBg)
|
||||
dotGoAddStr(w, "SetFgBg", t.SetFgBg)
|
||||
dotGoAddStr(w, "PadChar", t.PadChar)
|
||||
dotGoAddStr(w, "AltChars", t.AltChars)
|
||||
dotGoAddStr(w, "EnterAcs", t.EnterAcs)
|
||||
dotGoAddStr(w, "ExitAcs", t.ExitAcs)
|
||||
dotGoAddStr(w, "EnableAcs", t.EnableAcs)
|
||||
dotGoAddStr(w, "SetFgRGB", t.SetFgRGB)
|
||||
dotGoAddStr(w, "SetBgRGB", t.SetBgRGB)
|
||||
dotGoAddStr(w, "SetFgBgRGB", t.SetFgBgRGB)
|
||||
dotGoAddStr(w, "Mouse", t.Mouse)
|
||||
dotGoAddStr(w, "MouseMode", t.MouseMode)
|
||||
dotGoAddStr(w, "SetCursor", t.SetCursor)
|
||||
dotGoAddStr(w, "CursorBack1", t.CursorBack1)
|
||||
dotGoAddStr(w, "CursorUp1", t.CursorUp1)
|
||||
dotGoAddStr(w, "KeyUp", t.KeyUp)
|
||||
dotGoAddStr(w, "KeyDown", t.KeyDown)
|
||||
dotGoAddStr(w, "KeyRight", t.KeyRight)
|
||||
dotGoAddStr(w, "KeyLeft", t.KeyLeft)
|
||||
dotGoAddStr(w, "KeyInsert", t.KeyInsert)
|
||||
dotGoAddStr(w, "KeyDelete", t.KeyDelete)
|
||||
dotGoAddStr(w, "KeyBackspace", t.KeyBackspace)
|
||||
dotGoAddStr(w, "KeyHome", t.KeyHome)
|
||||
dotGoAddStr(w, "KeyEnd", t.KeyEnd)
|
||||
dotGoAddStr(w, "KeyPgUp", t.KeyPgUp)
|
||||
dotGoAddStr(w, "KeyPgDn", t.KeyPgDn)
|
||||
dotGoAddStr(w, "KeyF1", t.KeyF1)
|
||||
dotGoAddStr(w, "KeyF2", t.KeyF2)
|
||||
dotGoAddStr(w, "KeyF3", t.KeyF3)
|
||||
dotGoAddStr(w, "KeyF4", t.KeyF4)
|
||||
dotGoAddStr(w, "KeyF5", t.KeyF5)
|
||||
dotGoAddStr(w, "KeyF6", t.KeyF6)
|
||||
dotGoAddStr(w, "KeyF7", t.KeyF7)
|
||||
dotGoAddStr(w, "KeyF8", t.KeyF8)
|
||||
dotGoAddStr(w, "KeyF9", t.KeyF9)
|
||||
dotGoAddStr(w, "KeyF10", t.KeyF10)
|
||||
dotGoAddStr(w, "KeyF11", t.KeyF11)
|
||||
dotGoAddStr(w, "KeyF12", t.KeyF12)
|
||||
dotGoAddStr(w, "KeyF13", t.KeyF13)
|
||||
dotGoAddStr(w, "KeyF14", t.KeyF14)
|
||||
dotGoAddStr(w, "KeyF15", t.KeyF15)
|
||||
dotGoAddStr(w, "KeyF16", t.KeyF16)
|
||||
dotGoAddStr(w, "KeyF17", t.KeyF17)
|
||||
dotGoAddStr(w, "KeyF18", t.KeyF18)
|
||||
dotGoAddStr(w, "KeyF19", t.KeyF19)
|
||||
dotGoAddStr(w, "KeyF20", t.KeyF20)
|
||||
dotGoAddStr(w, "KeyF21", t.KeyF21)
|
||||
dotGoAddStr(w, "KeyF22", t.KeyF22)
|
||||
dotGoAddStr(w, "KeyF23", t.KeyF23)
|
||||
dotGoAddStr(w, "KeyF24", t.KeyF24)
|
||||
dotGoAddStr(w, "KeyF25", t.KeyF25)
|
||||
dotGoAddStr(w, "KeyF26", t.KeyF26)
|
||||
dotGoAddStr(w, "KeyF27", t.KeyF27)
|
||||
dotGoAddStr(w, "KeyF28", t.KeyF28)
|
||||
dotGoAddStr(w, "KeyF29", t.KeyF29)
|
||||
dotGoAddStr(w, "KeyF30", t.KeyF30)
|
||||
dotGoAddStr(w, "KeyF31", t.KeyF31)
|
||||
dotGoAddStr(w, "KeyF32", t.KeyF32)
|
||||
dotGoAddStr(w, "KeyF33", t.KeyF33)
|
||||
dotGoAddStr(w, "KeyF34", t.KeyF34)
|
||||
dotGoAddStr(w, "KeyF35", t.KeyF35)
|
||||
dotGoAddStr(w, "KeyF36", t.KeyF36)
|
||||
dotGoAddStr(w, "KeyF37", t.KeyF37)
|
||||
dotGoAddStr(w, "KeyF38", t.KeyF38)
|
||||
dotGoAddStr(w, "KeyF39", t.KeyF39)
|
||||
dotGoAddStr(w, "KeyF40", t.KeyF40)
|
||||
dotGoAddStr(w, "KeyF41", t.KeyF41)
|
||||
dotGoAddStr(w, "KeyF42", t.KeyF42)
|
||||
dotGoAddStr(w, "KeyF43", t.KeyF43)
|
||||
dotGoAddStr(w, "KeyF44", t.KeyF44)
|
||||
dotGoAddStr(w, "KeyF45", t.KeyF45)
|
||||
dotGoAddStr(w, "KeyF46", t.KeyF46)
|
||||
dotGoAddStr(w, "KeyF47", t.KeyF47)
|
||||
dotGoAddStr(w, "KeyF48", t.KeyF48)
|
||||
dotGoAddStr(w, "KeyF49", t.KeyF49)
|
||||
dotGoAddStr(w, "KeyF50", t.KeyF50)
|
||||
dotGoAddStr(w, "KeyF51", t.KeyF51)
|
||||
dotGoAddStr(w, "KeyF52", t.KeyF52)
|
||||
dotGoAddStr(w, "KeyF53", t.KeyF53)
|
||||
dotGoAddStr(w, "KeyF54", t.KeyF54)
|
||||
dotGoAddStr(w, "KeyF55", t.KeyF55)
|
||||
dotGoAddStr(w, "KeyF56", t.KeyF56)
|
||||
dotGoAddStr(w, "KeyF57", t.KeyF57)
|
||||
dotGoAddStr(w, "KeyF58", t.KeyF58)
|
||||
dotGoAddStr(w, "KeyF59", t.KeyF59)
|
||||
dotGoAddStr(w, "KeyF60", t.KeyF60)
|
||||
dotGoAddStr(w, "KeyF61", t.KeyF61)
|
||||
dotGoAddStr(w, "KeyF62", t.KeyF62)
|
||||
dotGoAddStr(w, "KeyF63", t.KeyF63)
|
||||
dotGoAddStr(w, "KeyF64", t.KeyF64)
|
||||
dotGoAddStr(w, "KeyCancel", t.KeyCancel)
|
||||
dotGoAddStr(w, "KeyPrint", t.KeyPrint)
|
||||
dotGoAddStr(w, "KeyExit", t.KeyExit)
|
||||
dotGoAddStr(w, "KeyHelp", t.KeyHelp)
|
||||
dotGoAddStr(w, "KeyClear", t.KeyClear)
|
||||
dotGoAddStr(w, "KeyBacktab", t.KeyBacktab)
|
||||
dotGoAddStr(w, "KeyShfLeft", t.KeyShfLeft)
|
||||
dotGoAddStr(w, "KeyShfRight", t.KeyShfRight)
|
||||
dotGoAddStr(w, "KeyShfUp", t.KeyShfUp)
|
||||
dotGoAddStr(w, "KeyShfDown", t.KeyShfDown)
|
||||
dotGoAddStr(w, "KeyCtrlLeft", t.KeyCtrlLeft)
|
||||
dotGoAddStr(w, "KeyCtrlRight", t.KeyCtrlRight)
|
||||
dotGoAddStr(w, "KeyCtrlUp", t.KeyCtrlUp)
|
||||
dotGoAddStr(w, "KeyCtrlDown", t.KeyCtrlDown)
|
||||
dotGoAddStr(w, "KeyMetaLeft", t.KeyMetaLeft)
|
||||
dotGoAddStr(w, "KeyMetaRight", t.KeyMetaRight)
|
||||
dotGoAddStr(w, "KeyMetaUp", t.KeyMetaUp)
|
||||
dotGoAddStr(w, "KeyMetaDown", t.KeyMetaDown)
|
||||
dotGoAddStr(w, "KeyAltLeft", t.KeyAltLeft)
|
||||
dotGoAddStr(w, "KeyAltRight", t.KeyAltRight)
|
||||
dotGoAddStr(w, "KeyAltUp", t.KeyAltUp)
|
||||
dotGoAddStr(w, "KeyAltDown", t.KeyAltDown)
|
||||
dotGoAddStr(w, "KeyAltShfLeft", t.KeyAltShfLeft)
|
||||
dotGoAddStr(w, "KeyAltShfRight", t.KeyAltShfRight)
|
||||
dotGoAddStr(w, "KeyAltShfUp", t.KeyAltShfUp)
|
||||
dotGoAddStr(w, "KeyAltShfDown", t.KeyAltShfDown)
|
||||
dotGoAddStr(w, "KeyMetaShfLeft", t.KeyMetaShfLeft)
|
||||
dotGoAddStr(w, "KeyMetaShfRight", t.KeyMetaShfRight)
|
||||
dotGoAddStr(w, "KeyMetaShfUp", t.KeyMetaShfUp)
|
||||
dotGoAddStr(w, "KeyMetaShfDown", t.KeyMetaShfDown)
|
||||
dotGoAddStr(w, "KeyCtrlShfLeft", t.KeyCtrlShfLeft)
|
||||
dotGoAddStr(w, "KeyCtrlShfRight", t.KeyCtrlShfRight)
|
||||
dotGoAddStr(w, "KeyCtrlShfUp", t.KeyCtrlShfUp)
|
||||
dotGoAddStr(w, "KeyCtrlShfDown", t.KeyCtrlShfDown)
|
||||
dotGoAddStr(w, "KeyShfHome", t.KeyShfHome)
|
||||
dotGoAddStr(w, "KeyShfEnd", t.KeyShfEnd)
|
||||
dotGoAddStr(w, "KeyCtrlHome", t.KeyCtrlHome)
|
||||
dotGoAddStr(w, "KeyCtrlEnd", t.KeyCtrlEnd)
|
||||
dotGoAddStr(w, "KeyMetaHome", t.KeyMetaHome)
|
||||
dotGoAddStr(w, "KeyMetaEnd", t.KeyMetaEnd)
|
||||
dotGoAddStr(w, "KeyAltHome", t.KeyAltHome)
|
||||
dotGoAddStr(w, "KeyAltEnd", t.KeyAltEnd)
|
||||
dotGoAddStr(w, "KeyCtrlShfHome", t.KeyCtrlShfHome)
|
||||
dotGoAddStr(w, "KeyCtrlShfEnd", t.KeyCtrlShfEnd)
|
||||
dotGoAddStr(w, "KeyMetaShfHome", t.KeyMetaShfHome)
|
||||
dotGoAddStr(w, "KeyMetaShfEnd", t.KeyMetaShfEnd)
|
||||
dotGoAddStr(w, "KeyAltShfHome", t.KeyAltShfHome)
|
||||
dotGoAddStr(w, "KeyAltShfEnd", t.KeyAltShfEnd)
|
||||
fmt.Fprintln(w, "\t})")
|
||||
fmt.Fprintln(w, "}")
|
||||
}
|
||||
|
||||
func main() {
|
||||
gofile := ""
|
||||
jsonfile := ""
|
||||
packname := "terminfo"
|
||||
nofatal := false
|
||||
quiet := false
|
||||
dogzip := false
|
||||
|
||||
flag.StringVar(&gofile, "go", "", "generate go source in named file")
|
||||
flag.StringVar(&jsonfile, "json", "", "generate json in named file")
|
||||
flag.StringVar(&packname, "P", packname, "package name (go source)")
|
||||
flag.BoolVar(&nofatal, "nofatal", false, "errors are not fatal")
|
||||
flag.BoolVar(&quiet, "quiet", false, "suppress error messages")
|
||||
flag.BoolVar(&dogzip, "gzip", false, "compress json output")
|
||||
flag.Parse()
|
||||
var e error
|
||||
js := []byte{}
|
||||
|
||||
args := flag.Args()
|
||||
if len(args) == 0 {
|
||||
args = []string{os.Getenv("TERM")}
|
||||
}
|
||||
|
||||
tdata := make(map[string]*terminfo.Terminfo)
|
||||
descs := make(map[string]string)
|
||||
|
||||
for _, term := range args {
|
||||
if t, desc, e := getinfo(term); e != nil {
|
||||
if !quiet {
|
||||
fmt.Fprintf(os.Stderr,
|
||||
"Failed loading %s: %v\n", term, e)
|
||||
}
|
||||
if !nofatal {
|
||||
os.Exit(1)
|
||||
}
|
||||
} else {
|
||||
tdata[term] = t
|
||||
descs[term] = desc
|
||||
}
|
||||
}
|
||||
|
||||
if len(tdata) == 0 {
|
||||
// No data.
|
||||
os.Exit(0)
|
||||
}
|
||||
if gofile != "" {
|
||||
w := os.Stdout
|
||||
if gofile != "-" {
|
||||
if w, e = os.Create(gofile); e != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed: %v", e)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
dotGoHeader(w, packname)
|
||||
for term, t := range tdata {
|
||||
if t.Name == term {
|
||||
dotGoInfo(w, t, descs[term])
|
||||
}
|
||||
}
|
||||
dotGoTrailer(w)
|
||||
if w != os.Stdout {
|
||||
w.Close()
|
||||
}
|
||||
} else {
|
||||
o := os.Stdout
|
||||
if jsonfile != "-" && jsonfile != "" {
|
||||
if o, e = os.Create(jsonfile); e != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed: %v", e)
|
||||
}
|
||||
}
|
||||
var w io.WriteCloser
|
||||
w = o
|
||||
if dogzip {
|
||||
w = gzip.NewWriter(o)
|
||||
}
|
||||
for _, term := range args {
|
||||
if t := tdata[term]; t != nil {
|
||||
js, e = json.Marshal(t)
|
||||
fmt.Fprintln(w, string(js))
|
||||
}
|
||||
// arguably if there is more than one term, this
|
||||
// should be a javascript array, but that's not how
|
||||
// we load it. We marshal objects one at a time from
|
||||
// the file.
|
||||
}
|
||||
if e != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed: %v", e)
|
||||
os.Exit(1)
|
||||
}
|
||||
w.Close()
|
||||
if w != o {
|
||||
o.Close()
|
||||
}
|
||||
}
|
||||
}
|
59
vendor/maunium.net/go/tcell/terminfo/models.txt
generated
vendored
Normal file
59
vendor/maunium.net/go/tcell/terminfo/models.txt
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
adm3a
|
||||
aixterm
|
||||
ansi
|
||||
aterm
|
||||
beterm
|
||||
bsdos-pc
|
||||
cygwin
|
||||
d200
|
||||
d210
|
||||
dtterm
|
||||
Eterm
|
||||
Eterm-256color
|
||||
eterm
|
||||
gnome
|
||||
gnome-256color
|
||||
hpterm
|
||||
hz1500
|
||||
konsole
|
||||
konsole-256color
|
||||
kterm
|
||||
linux
|
||||
pcansi
|
||||
rxvt
|
||||
rxvt-256color
|
||||
rxvt-unicode
|
||||
rxvt-unicode-256color
|
||||
screen
|
||||
screen-256color
|
||||
st
|
||||
st-256color
|
||||
st-truecolor
|
||||
st-meta
|
||||
st-meta-256color
|
||||
st-meta-truecolor
|
||||
sun
|
||||
sun-color
|
||||
tvi910
|
||||
tvi912
|
||||
tvi921
|
||||
tvi925
|
||||
tvi950
|
||||
tvi970
|
||||
vt52
|
||||
vt100
|
||||
vt102
|
||||
vt220
|
||||
vt320
|
||||
vt400
|
||||
vt420
|
||||
wy50
|
||||
wy60
|
||||
wy99-ansi
|
||||
wy99a-ansi
|
||||
xfce
|
||||
xnuppc
|
||||
xterm
|
||||
xterm
|
||||
xterm-256color
|
||||
xterm-truecolor
|
108
vendor/maunium.net/go/tcell/terminfo/term_Eterm.go
generated
vendored
Normal file
108
vendor/maunium.net/go/tcell/terminfo/term_Eterm.go
generated
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Eterm with xterm-style color support (X Window System)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "Eterm",
|
||||
Aliases: []string{"Eterm-color"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyF21: "\x1b[23$",
|
||||
KeyF22: "\x1b[24$",
|
||||
KeyF23: "\x1b[11^",
|
||||
KeyF24: "\x1b[12^",
|
||||
KeyF25: "\x1b[13^",
|
||||
KeyF26: "\x1b[14^",
|
||||
KeyF27: "\x1b[15^",
|
||||
KeyF28: "\x1b[17^",
|
||||
KeyF29: "\x1b[18^",
|
||||
KeyF30: "\x1b[19^",
|
||||
KeyF31: "\x1b[20^",
|
||||
KeyF32: "\x1b[21^",
|
||||
KeyF33: "\x1b[23^",
|
||||
KeyF34: "\x1b[24^",
|
||||
KeyF35: "\x1b[25^",
|
||||
KeyF36: "\x1b[26^",
|
||||
KeyF37: "\x1b[28^",
|
||||
KeyF38: "\x1b[29^",
|
||||
KeyF39: "\x1b[31^",
|
||||
KeyF40: "\x1b[32^",
|
||||
KeyF41: "\x1b[33^",
|
||||
KeyF42: "\x1b[34^",
|
||||
KeyF43: "\x1b[23@",
|
||||
KeyF44: "\x1b[24@",
|
||||
KeyHelp: "\x1b[28~",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
107
vendor/maunium.net/go/tcell/terminfo/term_Eterm_256color.go
generated
vendored
Normal file
107
vendor/maunium.net/go/tcell/terminfo/term_Eterm_256color.go
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Eterm with xterm 256-colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "Eterm-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyF21: "\x1b[23$",
|
||||
KeyF22: "\x1b[24$",
|
||||
KeyF23: "\x1b[11^",
|
||||
KeyF24: "\x1b[12^",
|
||||
KeyF25: "\x1b[13^",
|
||||
KeyF26: "\x1b[14^",
|
||||
KeyF27: "\x1b[15^",
|
||||
KeyF28: "\x1b[17^",
|
||||
KeyF29: "\x1b[18^",
|
||||
KeyF30: "\x1b[19^",
|
||||
KeyF31: "\x1b[20^",
|
||||
KeyF32: "\x1b[21^",
|
||||
KeyF33: "\x1b[23^",
|
||||
KeyF34: "\x1b[24^",
|
||||
KeyF35: "\x1b[25^",
|
||||
KeyF36: "\x1b[26^",
|
||||
KeyF37: "\x1b[28^",
|
||||
KeyF38: "\x1b[29^",
|
||||
KeyF39: "\x1b[31^",
|
||||
KeyF40: "\x1b[32^",
|
||||
KeyF41: "\x1b[33^",
|
||||
KeyF42: "\x1b[34^",
|
||||
KeyF43: "\x1b[23@",
|
||||
KeyF44: "\x1b[24@",
|
||||
KeyHelp: "\x1b[28~",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
24
vendor/maunium.net/go/tcell/terminfo/term_adm3a.go
generated
vendored
Normal file
24
vendor/maunium.net/go/tcell/terminfo/term_adm3a.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// lsi adm3a
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "adm3a",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1a$<1/>",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\n",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
})
|
||||
}
|
78
vendor/maunium.net/go/tcell/terminfo/term_aixterm.go
generated
vendored
Normal file
78
vendor/maunium.net/go/tcell/terminfo/term_aixterm.go
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// IBM Aixterm Terminal Emulator
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "aixterm",
|
||||
Columns: 80,
|
||||
Lines: 25,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
AttrOff: "\x1b[0;10m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "jjkkllmmnnqqttuuvvwwxx",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[139q",
|
||||
KeyDelete: "\x1b[P",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[H",
|
||||
KeyEnd: "\x1b[146q",
|
||||
KeyPgUp: "\x1b[150q",
|
||||
KeyPgDn: "\x1b[154q",
|
||||
KeyF1: "\x1b[001q",
|
||||
KeyF2: "\x1b[002q",
|
||||
KeyF3: "\x1b[003q",
|
||||
KeyF4: "\x1b[004q",
|
||||
KeyF5: "\x1b[005q",
|
||||
KeyF6: "\x1b[006q",
|
||||
KeyF7: "\x1b[007q",
|
||||
KeyF8: "\x1b[008q",
|
||||
KeyF9: "\x1b[009q",
|
||||
KeyF10: "\x1b[010q",
|
||||
KeyF11: "\x1b[011q",
|
||||
KeyF12: "\x1b[012q",
|
||||
KeyF13: "\x1b[013q",
|
||||
KeyF14: "\x1b[014q",
|
||||
KeyF15: "\x1b[015q",
|
||||
KeyF16: "\x1b[016q",
|
||||
KeyF17: "\x1b[017q",
|
||||
KeyF18: "\x1b[018q",
|
||||
KeyF19: "\x1b[019q",
|
||||
KeyF20: "\x1b[020q",
|
||||
KeyF21: "\x1b[021q",
|
||||
KeyF22: "\x1b[022q",
|
||||
KeyF23: "\x1b[023q",
|
||||
KeyF24: "\x1b[024q",
|
||||
KeyF25: "\x1b[025q",
|
||||
KeyF26: "\x1b[026q",
|
||||
KeyF27: "\x1b[027q",
|
||||
KeyF28: "\x1b[028q",
|
||||
KeyF29: "\x1b[029q",
|
||||
KeyF30: "\x1b[030q",
|
||||
KeyF31: "\x1b[031q",
|
||||
KeyF32: "\x1b[032q",
|
||||
KeyF33: "\x1b[033q",
|
||||
KeyF34: "\x1b[034q",
|
||||
KeyF35: "\x1b[035q",
|
||||
KeyF36: "\x1b[036q",
|
||||
KeyClear: "\x1b[144q",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
40
vendor/maunium.net/go/tcell/terminfo/term_ansi.go
generated
vendored
Normal file
40
vendor/maunium.net/go/tcell/terminfo/term_ansi.go
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// ansi/pc-term compatible with color
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "ansi",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
AttrOff: "\x1b[0;10m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe",
|
||||
EnterAcs: "\x1b[11m",
|
||||
ExitAcs: "\x1b[10m",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\x1b[D",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[L",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[H",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
109
vendor/maunium.net/go/tcell/terminfo/term_aterm.go
generated
vendored
Normal file
109
vendor/maunium.net/go/tcell/terminfo/term_aterm.go
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// AfterStep terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "aterm",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b=",
|
||||
ExitKeypad: "\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyF21: "\x1b[23$",
|
||||
KeyF22: "\x1b[24$",
|
||||
KeyF23: "\x1b[11^",
|
||||
KeyF24: "\x1b[12^",
|
||||
KeyF25: "\x1b[13^",
|
||||
KeyF26: "\x1b[14^",
|
||||
KeyF27: "\x1b[15^",
|
||||
KeyF28: "\x1b[17^",
|
||||
KeyF29: "\x1b[18^",
|
||||
KeyF30: "\x1b[19^",
|
||||
KeyF31: "\x1b[20^",
|
||||
KeyF32: "\x1b[21^",
|
||||
KeyF33: "\x1b[23^",
|
||||
KeyF34: "\x1b[24^",
|
||||
KeyF35: "\x1b[25^",
|
||||
KeyF36: "\x1b[26^",
|
||||
KeyF37: "\x1b[28^",
|
||||
KeyF38: "\x1b[29^",
|
||||
KeyF39: "\x1b[31^",
|
||||
KeyF40: "\x1b[32^",
|
||||
KeyF41: "\x1b[33^",
|
||||
KeyF42: "\x1b[34^",
|
||||
KeyF43: "\x1b[23@",
|
||||
KeyF44: "\x1b[24@",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
53
vendor/maunium.net/go/tcell/terminfo/term_beterm.go
generated
vendored
Normal file
53
vendor/maunium.net/go/tcell/terminfo/term_beterm.go
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// BeOS Terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "beterm",
|
||||
Columns: 80,
|
||||
Lines: 25,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
AttrOff: "\x1b[0;10m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?4h",
|
||||
ExitKeypad: "\x1b[?4l",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[16~",
|
||||
KeyF7: "\x1b[17~",
|
||||
KeyF8: "\x1b[18~",
|
||||
KeyF9: "\x1b[19~",
|
||||
KeyF10: "\x1b[20~",
|
||||
KeyF11: "\x1b[21~",
|
||||
KeyF12: "\x1b[22~",
|
||||
})
|
||||
}
|
41
vendor/maunium.net/go/tcell/terminfo/term_bsdos_pc.go
generated
vendored
Normal file
41
vendor/maunium.net/go/tcell/terminfo/term_bsdos_pc.go
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// IBM PC BSD/OS Console
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "bsdos-pc",
|
||||
Columns: 80,
|
||||
Lines: 25,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1bc",
|
||||
AttrOff: "\x1b[0;10m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe",
|
||||
EnterAcs: "\x1b[11m",
|
||||
ExitAcs: "\x1b[10m",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[L",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[H",
|
||||
KeyPgUp: "\x1b[I",
|
||||
KeyPgDn: "\x1b[G",
|
||||
})
|
||||
}
|
62
vendor/maunium.net/go/tcell/terminfo/term_cygwin.go
generated
vendored
Normal file
62
vendor/maunium.net/go/tcell/terminfo/term_cygwin.go
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// ansi emulation for Cygwin
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "cygwin",
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
AttrOff: "\x1b[0;10m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe",
|
||||
EnterAcs: "\x1b[11m",
|
||||
ExitAcs: "\x1b[10m",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[[A",
|
||||
KeyF2: "\x1b[[B",
|
||||
KeyF3: "\x1b[[C",
|
||||
KeyF4: "\x1b[[D",
|
||||
KeyF5: "\x1b[[E",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
})
|
||||
}
|
96
vendor/maunium.net/go/tcell/terminfo/term_d200.go
generated
vendored
Normal file
96
vendor/maunium.net/go/tcell/terminfo/term_d200.go
generated
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Data General DASHER D200
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "d200",
|
||||
Aliases: []string{"d200-dg"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\f",
|
||||
AttrOff: "\x0f\x15\x1d\x1eE",
|
||||
Underline: "\x14",
|
||||
Bold: "\x1eD\x14",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1c",
|
||||
Blink: "\x0e",
|
||||
Reverse: "\x1eD",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x10%p2%c%p1%c",
|
||||
CursorBack1: "\x19",
|
||||
CursorUp1: "\x17",
|
||||
KeyUp: "\x17",
|
||||
KeyDown: "\x1a",
|
||||
KeyRight: "\x18",
|
||||
KeyLeft: "\x19",
|
||||
KeyHome: "\b",
|
||||
KeyF1: "\x1eq",
|
||||
KeyF2: "\x1er",
|
||||
KeyF3: "\x1es",
|
||||
KeyF4: "\x1et",
|
||||
KeyF5: "\x1eu",
|
||||
KeyF6: "\x1ev",
|
||||
KeyF7: "\x1ew",
|
||||
KeyF8: "\x1ex",
|
||||
KeyF9: "\x1ey",
|
||||
KeyF10: "\x1ez",
|
||||
KeyF11: "\x1e{",
|
||||
KeyF12: "\x1e|",
|
||||
KeyF13: "\x1e}",
|
||||
KeyF14: "\x1e~",
|
||||
KeyF15: "\x1ep",
|
||||
KeyF16: "\x1ea",
|
||||
KeyF17: "\x1eb",
|
||||
KeyF18: "\x1ec",
|
||||
KeyF19: "\x1ed",
|
||||
KeyF20: "\x1ee",
|
||||
KeyF21: "\x1ef",
|
||||
KeyF22: "\x1eg",
|
||||
KeyF23: "\x1eh",
|
||||
KeyF24: "\x1ei",
|
||||
KeyF25: "\x1ej",
|
||||
KeyF26: "\x1ek",
|
||||
KeyF27: "\x1el",
|
||||
KeyF28: "\x1em",
|
||||
KeyF29: "\x1en",
|
||||
KeyF30: "\x1e`",
|
||||
KeyF31: "\x1e1",
|
||||
KeyF32: "\x1e2",
|
||||
KeyF33: "\x1e3",
|
||||
KeyF34: "\x1e4",
|
||||
KeyF35: "\x1e5",
|
||||
KeyF36: "\x1e6",
|
||||
KeyF37: "\x1e7",
|
||||
KeyF38: "\x1e8",
|
||||
KeyF39: "\x1e9",
|
||||
KeyF40: "\x1e:",
|
||||
KeyF41: "\x1e;",
|
||||
KeyF42: "\x1e<",
|
||||
KeyF43: "\x1e=",
|
||||
KeyF44: "\x1e>",
|
||||
KeyF45: "\x1e0",
|
||||
KeyF46: "\x1e!",
|
||||
KeyF47: "\x1e\"",
|
||||
KeyF48: "\x1e#",
|
||||
KeyF49: "\x1e$",
|
||||
KeyF50: "\x1e%%",
|
||||
KeyF51: "\x1e&",
|
||||
KeyF52: "\x1e'",
|
||||
KeyF53: "\x1e(",
|
||||
KeyF54: "\x1e)",
|
||||
KeyF55: "\x1e*",
|
||||
KeyF56: "\x1e+",
|
||||
KeyF57: "\x1e,",
|
||||
KeyF58: "\x1e-",
|
||||
KeyF59: "\x1e.",
|
||||
KeyF60: "\x1e ",
|
||||
KeyClear: "\f",
|
||||
KeyShfLeft: "\x1e\x19",
|
||||
KeyShfRight: "\x1e\x18",
|
||||
KeyShfHome: "\x1e\b",
|
||||
})
|
||||
}
|
94
vendor/maunium.net/go/tcell/terminfo/term_d210.go
generated
vendored
Normal file
94
vendor/maunium.net/go/tcell/terminfo/term_d210.go
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Data General DASHER D210 series
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "d210",
|
||||
Aliases: []string{"d214"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[2J",
|
||||
AttrOff: "\x1b[m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[4;7m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyHome: "\x1b[H",
|
||||
KeyF1: "\x1b[001z",
|
||||
KeyF2: "\x1b[002z",
|
||||
KeyF3: "\x1b[003z",
|
||||
KeyF4: "\x1b[004z",
|
||||
KeyF5: "\x1b[005z",
|
||||
KeyF6: "\x1b[006z",
|
||||
KeyF7: "\x1b[007z",
|
||||
KeyF8: "\x1b[008z",
|
||||
KeyF9: "\x1b[009z",
|
||||
KeyF10: "\x1b[010z",
|
||||
KeyF11: "\x1b[011z",
|
||||
KeyF12: "\x1b[012z",
|
||||
KeyF13: "\x1b[013z",
|
||||
KeyF14: "\x1b[014z",
|
||||
KeyF15: "\x1b[000z",
|
||||
KeyF16: "\x1b[101z",
|
||||
KeyF17: "\x1b[102z",
|
||||
KeyF18: "\x1b[103z",
|
||||
KeyF19: "\x1b[104z",
|
||||
KeyF20: "\x1b[105z",
|
||||
KeyF21: "\x1b[106z",
|
||||
KeyF22: "\x1b[107z",
|
||||
KeyF23: "\x1b[108z",
|
||||
KeyF24: "\x1b[109z",
|
||||
KeyF25: "\x1b[110z",
|
||||
KeyF26: "\x1b[111z",
|
||||
KeyF27: "\x1b[112z",
|
||||
KeyF28: "\x1b[113z",
|
||||
KeyF29: "\x1b[114z",
|
||||
KeyF30: "\x1b[100z",
|
||||
KeyF31: "\x1b[201z",
|
||||
KeyF32: "\x1b[202z",
|
||||
KeyF33: "\x1b[203z",
|
||||
KeyF34: "\x1b[204z",
|
||||
KeyF35: "\x1b[205z",
|
||||
KeyF36: "\x1b[206z",
|
||||
KeyF37: "\x1b[207z",
|
||||
KeyF38: "\x1b[208z",
|
||||
KeyF39: "\x1b[209z",
|
||||
KeyF40: "\x1b[210z",
|
||||
KeyF41: "\x1b[211z",
|
||||
KeyF42: "\x1b[212z",
|
||||
KeyF43: "\x1b[213z",
|
||||
KeyF44: "\x1b[214z",
|
||||
KeyF45: "\x1b[200z",
|
||||
KeyF46: "\x1b[301z",
|
||||
KeyF47: "\x1b[302z",
|
||||
KeyF48: "\x1b[303z",
|
||||
KeyF49: "\x1b[304z",
|
||||
KeyF50: "\x1b[305z",
|
||||
KeyF51: "\x1b[306z",
|
||||
KeyF52: "\x1b[307z",
|
||||
KeyF53: "\x1b[308z",
|
||||
KeyF54: "\x1b[309z",
|
||||
KeyF55: "\x1b[310z",
|
||||
KeyF56: "\x1b[311z",
|
||||
KeyF57: "\x1b[312z",
|
||||
KeyF58: "\x1b[313z",
|
||||
KeyF59: "\x1b[314z",
|
||||
KeyF60: "\x1b[300z",
|
||||
KeyPrint: "\x1b[i",
|
||||
KeyClear: "\x1b[2J",
|
||||
})
|
||||
}
|
66
vendor/maunium.net/go/tcell/terminfo/term_dtterm.go
generated
vendored
Normal file
66
vendor/maunium.net/go/tcell/terminfo/term_dtterm.go
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// CDE desktop terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "dtterm",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyHelp: "\x1b[28~",
|
||||
})
|
||||
}
|
156
vendor/maunium.net/go/tcell/terminfo/term_gnome.go
generated
vendored
Normal file
156
vendor/maunium.net/go/tcell/terminfo/term_gnome.go
generated
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// GNOME Terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "gnome",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1bO1;2P",
|
||||
KeyF14: "\x1bO1;2Q",
|
||||
KeyF15: "\x1bO1;2R",
|
||||
KeyF16: "\x1bO1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1bO1;5P",
|
||||
KeyF26: "\x1bO1;5Q",
|
||||
KeyF27: "\x1bO1;5R",
|
||||
KeyF28: "\x1bO1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1bO1;6P",
|
||||
KeyF38: "\x1bO1;6Q",
|
||||
KeyF39: "\x1bO1;6R",
|
||||
KeyF40: "\x1bO1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1bO1;3P",
|
||||
KeyF50: "\x1bO1;3Q",
|
||||
KeyF51: "\x1bO1;3R",
|
||||
KeyF52: "\x1bO1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1bO1;4P",
|
||||
KeyF62: "\x1bO1;4Q",
|
||||
KeyF63: "\x1bO1;4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
156
vendor/maunium.net/go/tcell/terminfo/term_gnome_256color.go
generated
vendored
Normal file
156
vendor/maunium.net/go/tcell/terminfo/term_gnome_256color.go
generated
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// GNOME Terminal with xterm 256-colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "gnome-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
49
vendor/maunium.net/go/tcell/terminfo/term_hpterm.go
generated
vendored
Normal file
49
vendor/maunium.net/go/tcell/terminfo/term_hpterm.go
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// hp X11 terminal emulator
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "hpterm",
|
||||
Aliases: []string{"X-hpterm"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b&a0y0C\x1bJ",
|
||||
AttrOff: "\x1b&d@",
|
||||
Underline: "\x1b&dD",
|
||||
Bold: "\x1b&dB",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b&dH",
|
||||
Reverse: "\x1b&dB",
|
||||
EnterKeypad: "\x1b&s1A",
|
||||
ExitKeypad: "\x1b&s0A",
|
||||
PadChar: "\x00",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
SetCursor: "\x1b&a%p1%dy%p2%dC",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1bA",
|
||||
KeyUp: "\x1bA",
|
||||
KeyDown: "\x1bB",
|
||||
KeyRight: "\x1bC",
|
||||
KeyLeft: "\x1bD",
|
||||
KeyInsert: "\x1bQ",
|
||||
KeyDelete: "\x1bP",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1bh",
|
||||
KeyPgUp: "\x1bV",
|
||||
KeyPgDn: "\x1bU",
|
||||
KeyF1: "\x1bp",
|
||||
KeyF2: "\x1bq",
|
||||
KeyF3: "\x1br",
|
||||
KeyF4: "\x1bs",
|
||||
KeyF5: "\x1bt",
|
||||
KeyF6: "\x1bu",
|
||||
KeyF7: "\x1bv",
|
||||
KeyF8: "\x1bw",
|
||||
KeyClear: "\x1bJ",
|
||||
})
|
||||
}
|
25
vendor/maunium.net/go/tcell/terminfo/term_hz1500.go
generated
vendored
Normal file
25
vendor/maunium.net/go/tcell/terminfo/term_hz1500.go
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// hazeltine 1500
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "hz1500",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "~\x1c",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "~\x11%p2%p2%?%{30}%>%t%' '%+%;%'`'%+%c%p1%'`'%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "~\f",
|
||||
KeyUp: "~\f",
|
||||
KeyDown: "\n",
|
||||
KeyRight: "\x10",
|
||||
KeyLeft: "\b",
|
||||
KeyHome: "~\x12",
|
||||
})
|
||||
}
|
114
vendor/maunium.net/go/tcell/terminfo/term_konsole.go
generated
vendored
Normal file
114
vendor/maunium.net/go/tcell/terminfo/term_konsole.go
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// KDE console window
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "konsole",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1bO2P",
|
||||
KeyF14: "\x1bO2Q",
|
||||
KeyF15: "\x1bO2R",
|
||||
KeyF16: "\x1bO2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1bO5P",
|
||||
KeyF26: "\x1bO5Q",
|
||||
KeyF27: "\x1bO5R",
|
||||
KeyF28: "\x1bO5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1bO6P",
|
||||
KeyF38: "\x1bO6Q",
|
||||
KeyF39: "\x1bO6R",
|
||||
KeyF40: "\x1bO6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1bO3P",
|
||||
KeyF50: "\x1bO3Q",
|
||||
KeyF51: "\x1bO3R",
|
||||
KeyF52: "\x1bO3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1bO4P",
|
||||
KeyF62: "\x1bO4Q",
|
||||
KeyF63: "\x1bO4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
114
vendor/maunium.net/go/tcell/terminfo/term_konsole_256color.go
generated
vendored
Normal file
114
vendor/maunium.net/go/tcell/terminfo/term_konsole_256color.go
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// KDE console window with xterm 256-colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "konsole-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1bO2P",
|
||||
KeyF14: "\x1bO2Q",
|
||||
KeyF15: "\x1bO2R",
|
||||
KeyF16: "\x1bO2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1bO5P",
|
||||
KeyF26: "\x1bO5Q",
|
||||
KeyF27: "\x1bO5R",
|
||||
KeyF28: "\x1bO5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1bO6P",
|
||||
KeyF38: "\x1bO6Q",
|
||||
KeyF39: "\x1bO6R",
|
||||
KeyF40: "\x1bO6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1bO3P",
|
||||
KeyF50: "\x1bO3Q",
|
||||
KeyF51: "\x1bO3R",
|
||||
KeyF52: "\x1bO3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1bO4P",
|
||||
KeyF62: "\x1bO4Q",
|
||||
KeyF63: "\x1bO4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
66
vendor/maunium.net/go/tcell/terminfo/term_kterm.go
generated
vendored
Normal file
66
vendor/maunium.net/go/tcell/terminfo/term_kterm.go
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// kterm kanji terminal emulator (X window system)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "kterm",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
AttrOff: "\x1b[m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aajjkkllmmnnooppqqrrssttuuvvwwxx~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
})
|
||||
}
|
68
vendor/maunium.net/go/tcell/terminfo/term_linux.go
generated
vendored
Normal file
68
vendor/maunium.net/go/tcell/terminfo/term_linux.go
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// linux console
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "linux",
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
ShowCursor: "\x1b[?25h\x1b[?0c",
|
||||
HideCursor: "\x1b[?25l\x1b[?1c",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "++,,--..00__``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}c~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[[A",
|
||||
KeyF2: "\x1b[[B",
|
||||
KeyF3: "\x1b[[C",
|
||||
KeyF4: "\x1b[[D",
|
||||
KeyF5: "\x1b[[E",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
38
vendor/maunium.net/go/tcell/terminfo/term_pcansi.go
generated
vendored
Normal file
38
vendor/maunium.net/go/tcell/terminfo/term_pcansi.go
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// ibm-pc terminal programs claiming to be ansi
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "pcansi",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
AttrOff: "\x1b[0;10m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe",
|
||||
EnterAcs: "\x1b[12m",
|
||||
ExitAcs: "\x1b[10m",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\x1b[D",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[H",
|
||||
})
|
||||
}
|
109
vendor/maunium.net/go/tcell/terminfo/term_rxvt.go
generated
vendored
Normal file
109
vendor/maunium.net/go/tcell/terminfo/term_rxvt.go
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// rxvt terminal emulator (X Window System)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "rxvt",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b=",
|
||||
ExitKeypad: "\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyF21: "\x1b[23$",
|
||||
KeyF22: "\x1b[24$",
|
||||
KeyF23: "\x1b[11^",
|
||||
KeyF24: "\x1b[12^",
|
||||
KeyF25: "\x1b[13^",
|
||||
KeyF26: "\x1b[14^",
|
||||
KeyF27: "\x1b[15^",
|
||||
KeyF28: "\x1b[17^",
|
||||
KeyF29: "\x1b[18^",
|
||||
KeyF30: "\x1b[19^",
|
||||
KeyF31: "\x1b[20^",
|
||||
KeyF32: "\x1b[21^",
|
||||
KeyF33: "\x1b[23^",
|
||||
KeyF34: "\x1b[24^",
|
||||
KeyF35: "\x1b[25^",
|
||||
KeyF36: "\x1b[26^",
|
||||
KeyF37: "\x1b[28^",
|
||||
KeyF38: "\x1b[29^",
|
||||
KeyF39: "\x1b[31^",
|
||||
KeyF40: "\x1b[32^",
|
||||
KeyF41: "\x1b[33^",
|
||||
KeyF42: "\x1b[34^",
|
||||
KeyF43: "\x1b[23@",
|
||||
KeyF44: "\x1b[24@",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
109
vendor/maunium.net/go/tcell/terminfo/term_rxvt_256color.go
generated
vendored
Normal file
109
vendor/maunium.net/go/tcell/terminfo/term_rxvt_256color.go
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// rxvt 2.7.9 with xterm 256-colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "rxvt-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b=",
|
||||
ExitKeypad: "\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyF21: "\x1b[23$",
|
||||
KeyF22: "\x1b[24$",
|
||||
KeyF23: "\x1b[11^",
|
||||
KeyF24: "\x1b[12^",
|
||||
KeyF25: "\x1b[13^",
|
||||
KeyF26: "\x1b[14^",
|
||||
KeyF27: "\x1b[15^",
|
||||
KeyF28: "\x1b[17^",
|
||||
KeyF29: "\x1b[18^",
|
||||
KeyF30: "\x1b[19^",
|
||||
KeyF31: "\x1b[20^",
|
||||
KeyF32: "\x1b[21^",
|
||||
KeyF33: "\x1b[23^",
|
||||
KeyF34: "\x1b[24^",
|
||||
KeyF35: "\x1b[25^",
|
||||
KeyF36: "\x1b[26^",
|
||||
KeyF37: "\x1b[28^",
|
||||
KeyF38: "\x1b[29^",
|
||||
KeyF39: "\x1b[31^",
|
||||
KeyF40: "\x1b[32^",
|
||||
KeyF41: "\x1b[33^",
|
||||
KeyF42: "\x1b[34^",
|
||||
KeyF43: "\x1b[23@",
|
||||
KeyF44: "\x1b[24@",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
83
vendor/maunium.net/go/tcell/terminfo/term_rxvt_unicode.go
generated
vendored
Normal file
83
vendor/maunium.net/go/tcell/terminfo/term_rxvt_unicode.go
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// rxvt-unicode terminal (X Window System)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "rxvt-unicode",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 88,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[r\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b=",
|
||||
ExitKeypad: "\x1b>",
|
||||
SetFg: "\x1b[38;5;%p1%dm",
|
||||
SetBg: "\x1b[48;5;%p1%dm",
|
||||
SetFgBg: "\x1b[38;5;%p1%d;48;5;%p2%dm",
|
||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
83
vendor/maunium.net/go/tcell/terminfo/term_rxvt_unicode_256color.go
generated
vendored
Normal file
83
vendor/maunium.net/go/tcell/terminfo/term_rxvt_unicode_256color.go
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// rxvt-unicode terminal with 256 colors (X Window System)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "rxvt-unicode-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[r\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b=",
|
||||
ExitKeypad: "\x1b>",
|
||||
SetFg: "\x1b[38;5;%p1%dm",
|
||||
SetBg: "\x1b[48;5;%p1%dm",
|
||||
SetFgBg: "\x1b[38;5;%p1%d;48;5;%p2%dm",
|
||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[7~",
|
||||
KeyEnd: "\x1b[8~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1b[11~",
|
||||
KeyF2: "\x1b[12~",
|
||||
KeyF3: "\x1b[13~",
|
||||
KeyF4: "\x1b[14~",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[d",
|
||||
KeyShfRight: "\x1b[c",
|
||||
KeyShfUp: "\x1b[a",
|
||||
KeyShfDown: "\x1b[b",
|
||||
KeyCtrlLeft: "\x1b[Od",
|
||||
KeyCtrlRight: "\x1b[Oc",
|
||||
KeyCtrlUp: "\x1b[Oa",
|
||||
KeyCtrlDown: "\x1b[Ob",
|
||||
KeyShfHome: "\x1b[7$",
|
||||
KeyShfEnd: "\x1b[8$",
|
||||
KeyCtrlHome: "\x1b[7^",
|
||||
KeyCtrlEnd: "\x1b[8^",
|
||||
})
|
||||
}
|
66
vendor/maunium.net/go/tcell/terminfo/term_screen.go
generated
vendored
Normal file
66
vendor/maunium.net/go/tcell/terminfo/term_screen.go
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// VT 100/ANSI X3.64 virtual terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "screen",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[34h\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1bM",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
66
vendor/maunium.net/go/tcell/terminfo/term_screen_256color.go
generated
vendored
Normal file
66
vendor/maunium.net/go/tcell/terminfo/term_screen_256color.go
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// GNU Screen with 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "screen-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[34h\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1bM",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
})
|
||||
}
|
158
vendor/maunium.net/go/tcell/terminfo/term_st.go
generated
vendored
Normal file
158
vendor/maunium.net/go/tcell/terminfo/term_st.go
generated
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// simpleterm 0.4.1
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "st",
|
||||
Aliases: []string{"stterm"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyClear: "\x1b[3;5~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
158
vendor/maunium.net/go/tcell/terminfo/term_st_256color.go
generated
vendored
Normal file
158
vendor/maunium.net/go/tcell/terminfo/term_st_256color.go
generated
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// simpleterm with 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "st-256color",
|
||||
Aliases: []string{"stterm-256color"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyClear: "\x1b[3;5~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
155
vendor/maunium.net/go/tcell/terminfo/term_st_meta.go
generated
vendored
Normal file
155
vendor/maunium.net/go/tcell/terminfo/term_st_meta.go
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// simpleterm with meta key
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "st-meta",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyClear: "\x1b[3;5~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
155
vendor/maunium.net/go/tcell/terminfo/term_st_meta_256color.go
generated
vendored
Normal file
155
vendor/maunium.net/go/tcell/terminfo/term_st_meta_256color.go
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// simpleterm with meta key and 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "st-meta-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyClear: "\x1b[3;5~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
158
vendor/maunium.net/go/tcell/terminfo/term_st_meta_truecolor.go
generated
vendored
Normal file
158
vendor/maunium.net/go/tcell/terminfo/term_st_meta_truecolor.go
generated
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// simpleterm with meta key and 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "st-meta-truecolor",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
EnableAcs: "\x1b)0",
|
||||
SetFgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%dm",
|
||||
SetBgRGB: "\x1b[48;2;%p1%d;%p2%d;%p3%dm",
|
||||
SetFgBgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%d;48;2;%p4%d;%p5%d;%p6%dm",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "177",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyClear: "\x1b[3;5~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
158
vendor/maunium.net/go/tcell/terminfo/term_st_truecolor.go
generated
vendored
Normal file
158
vendor/maunium.net/go/tcell/terminfo/term_st_truecolor.go
generated
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// simpleterm with 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "st-truecolor",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
EnableAcs: "\x1b)0",
|
||||
SetFgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%dm",
|
||||
SetBgRGB: "\x1b[48;2;%p1%d;%p2%d;%p3%dm",
|
||||
SetFgBgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%d;48;2;%p4%d;%p5%d;%p6%dm",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "177",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyEnd: "\x1b[4~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyClear: "\x1b[3;5~",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
46
vendor/maunium.net/go/tcell/terminfo/term_sun.go
generated
vendored
Normal file
46
vendor/maunium.net/go/tcell/terminfo/term_sun.go
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Sun Microsystems Inc. workstation console
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "sun",
|
||||
Aliases: []string{"sun1", "sun2"},
|
||||
Columns: 80,
|
||||
Lines: 34,
|
||||
Bell: "\a",
|
||||
Clear: "\f",
|
||||
AttrOff: "\x1b[m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[247z",
|
||||
KeyDelete: "\u007f",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[214z",
|
||||
KeyEnd: "\x1b[220z",
|
||||
KeyPgUp: "\x1b[216z",
|
||||
KeyPgDn: "\x1b[222z",
|
||||
KeyF1: "\x1b[224z",
|
||||
KeyF2: "\x1b[225z",
|
||||
KeyF3: "\x1b[226z",
|
||||
KeyF4: "\x1b[227z",
|
||||
KeyF5: "\x1b[228z",
|
||||
KeyF6: "\x1b[229z",
|
||||
KeyF7: "\x1b[230z",
|
||||
KeyF8: "\x1b[231z",
|
||||
KeyF9: "\x1b[232z",
|
||||
KeyF10: "\x1b[233z",
|
||||
KeyF11: "\x1b[234z",
|
||||
KeyF12: "\x1b[235z",
|
||||
})
|
||||
}
|
50
vendor/maunium.net/go/tcell/terminfo/term_sun_color.go
generated
vendored
Normal file
50
vendor/maunium.net/go/tcell/terminfo/term_sun_color.go
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Sun Microsystems Workstation console with color support (IA systems)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "sun-color",
|
||||
Columns: 80,
|
||||
Lines: 34,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\f",
|
||||
AttrOff: "\x1b[m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[247z",
|
||||
KeyDelete: "\u007f",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[214z",
|
||||
KeyEnd: "\x1b[220z",
|
||||
KeyPgUp: "\x1b[216z",
|
||||
KeyPgDn: "\x1b[222z",
|
||||
KeyF1: "\x1b[224z",
|
||||
KeyF2: "\x1b[225z",
|
||||
KeyF3: "\x1b[226z",
|
||||
KeyF4: "\x1b[227z",
|
||||
KeyF5: "\x1b[228z",
|
||||
KeyF6: "\x1b[229z",
|
||||
KeyF7: "\x1b[230z",
|
||||
KeyF8: "\x1b[231z",
|
||||
KeyF9: "\x1b[232z",
|
||||
KeyF10: "\x1b[233z",
|
||||
KeyF11: "\x1b[234z",
|
||||
KeyF12: "\x1b[235z",
|
||||
})
|
||||
}
|
38
vendor/maunium.net/go/tcell/terminfo/term_tvi910.go
generated
vendored
Normal file
38
vendor/maunium.net/go/tcell/terminfo/term_tvi910.go
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// televideo model 910
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "tvi910",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1a",
|
||||
AttrOff: "\x1bG0",
|
||||
Underline: "\x1bG8",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1bG4",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\n",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1e",
|
||||
KeyF1: "\x01@\r",
|
||||
KeyF2: "\x01A\r",
|
||||
KeyF3: "\x01B\r",
|
||||
KeyF4: "\x01C\r",
|
||||
KeyF5: "\x01D\r",
|
||||
KeyF6: "\x01E\r",
|
||||
KeyF7: "\x01F\r",
|
||||
KeyF8: "\x01G\r",
|
||||
KeyF9: "\x01H\r",
|
||||
})
|
||||
}
|
37
vendor/maunium.net/go/tcell/terminfo/term_tvi912.go
generated
vendored
Normal file
37
vendor/maunium.net/go/tcell/terminfo/term_tvi912.go
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// old televideo 912/914/920
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "tvi912",
|
||||
Aliases: []string{"tvi914", "tvi920"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1a",
|
||||
Underline: "\x1bl",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\n",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1e",
|
||||
KeyF1: "\x01@\r",
|
||||
KeyF2: "\x01A\r",
|
||||
KeyF3: "\x01B\r",
|
||||
KeyF4: "\x01C\r",
|
||||
KeyF5: "\x01D\r",
|
||||
KeyF6: "\x01E\r",
|
||||
KeyF7: "\x01F\r",
|
||||
KeyF8: "\x01G\r",
|
||||
KeyF9: "\x01H\r",
|
||||
})
|
||||
}
|
33
vendor/maunium.net/go/tcell/terminfo/term_tvi921.go
generated
vendored
Normal file
33
vendor/maunium.net/go/tcell/terminfo/term_tvi921.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// televideo model 921 with sysline same as page & real vi function
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "tvi921",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Clear: "\x1a",
|
||||
ShowCursor: "\x1b.3",
|
||||
AttrOff: "\x1bG0",
|
||||
Underline: "\x1bG8",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1bG4",
|
||||
PadChar: "\x00",
|
||||
EnterAcs: "\x1b$",
|
||||
ExitAcs: "\x1b%%",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c$<3/>",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\x16",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyInsert: "\x1bQ",
|
||||
KeyDelete: "\x1bW",
|
||||
KeyBackspace: "\b",
|
||||
KeyClear: "\x1a",
|
||||
})
|
||||
}
|
42
vendor/maunium.net/go/tcell/terminfo/term_tvi925.go
generated
vendored
Normal file
42
vendor/maunium.net/go/tcell/terminfo/term_tvi925.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// televideo 925
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "tvi925",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1a",
|
||||
ShowCursor: "\x1b.4",
|
||||
AttrOff: "\x1bG0",
|
||||
Underline: "\x1bG8",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1bG4",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\x16",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyInsert: "\x1bQ",
|
||||
KeyDelete: "\x1bW",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1e",
|
||||
KeyF1: "\x01@\r",
|
||||
KeyF2: "\x01A\r",
|
||||
KeyF3: "\x01B\r",
|
||||
KeyF4: "\x01C\r",
|
||||
KeyF5: "\x01D\r",
|
||||
KeyF6: "\x01E\r",
|
||||
KeyF7: "\x01F\r",
|
||||
KeyF8: "\x01G\r",
|
||||
KeyF9: "\x01H\r",
|
||||
KeyClear: "\x1a",
|
||||
})
|
||||
}
|
45
vendor/maunium.net/go/tcell/terminfo/term_tvi950.go
generated
vendored
Normal file
45
vendor/maunium.net/go/tcell/terminfo/term_tvi950.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// televideo 950
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "tvi950",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b*",
|
||||
AttrOff: "\x1bG0",
|
||||
Underline: "\x1bG8",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1bG4",
|
||||
PadChar: "\x00",
|
||||
AltChars: "b\tc\fd\re\ni\v",
|
||||
EnterAcs: "\x15",
|
||||
ExitAcs: "\x18",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\x16",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyInsert: "\x1bQ",
|
||||
KeyDelete: "\x1bW",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1e",
|
||||
KeyF1: "\x01@\r",
|
||||
KeyF2: "\x01A\r",
|
||||
KeyF3: "\x01B\r",
|
||||
KeyF4: "\x01C\r",
|
||||
KeyF5: "\x01D\r",
|
||||
KeyF6: "\x01E\r",
|
||||
KeyF7: "\x01F\r",
|
||||
KeyF8: "\x01G\r",
|
||||
KeyF9: "\x01H\r",
|
||||
KeyClear: "\x1b*",
|
||||
KeyBacktab: "\x1bI",
|
||||
})
|
||||
}
|
39
vendor/maunium.net/go/tcell/terminfo/term_tvi970.go
generated
vendored
Normal file
39
vendor/maunium.net/go/tcell/terminfo/term_tvi970.go
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// televideo 970
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "tvi970",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?20l\x1b[?7h\x1b[1Q",
|
||||
AttrOff: "\x1b[m",
|
||||
Underline: "\x1b[4m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
PadChar: "\x00",
|
||||
EnterAcs: "\x1b(B",
|
||||
ExitAcs: "\x1b(B",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%df",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1bM",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1b[H",
|
||||
KeyF1: "\x1b?a",
|
||||
KeyF2: "\x1b?b",
|
||||
KeyF3: "\x1b?c",
|
||||
KeyF4: "\x1b?d",
|
||||
KeyF5: "\x1b?e",
|
||||
KeyF6: "\x1b?f",
|
||||
KeyF7: "\x1b?g",
|
||||
KeyF8: "\x1b?h",
|
||||
KeyF9: "\x1b?i",
|
||||
})
|
||||
}
|
47
vendor/maunium.net/go/tcell/terminfo/term_vt100.go
generated
vendored
Normal file
47
vendor/maunium.net/go/tcell/terminfo/term_vt100.go
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// dec vt100 (w/advanced video)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt100",
|
||||
Aliases: []string{"vt100-am"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J$<50>",
|
||||
AttrOff: "\x1b[m\x0f$<2>",
|
||||
Underline: "\x1b[4m$<2>",
|
||||
Bold: "\x1b[1m$<2>",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m$<2>",
|
||||
Reverse: "\x1b[7m$<2>",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH$<5>",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A$<2>",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyBackspace: "\b",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1bOt",
|
||||
KeyF6: "\x1bOu",
|
||||
KeyF7: "\x1bOv",
|
||||
KeyF8: "\x1bOl",
|
||||
KeyF9: "\x1bOw",
|
||||
KeyF10: "\x1bOx",
|
||||
})
|
||||
}
|
46
vendor/maunium.net/go/tcell/terminfo/term_vt102.go
generated
vendored
Normal file
46
vendor/maunium.net/go/tcell/terminfo/term_vt102.go
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// dec vt102
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt102",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J$<50>",
|
||||
AttrOff: "\x1b[m\x0f$<2>",
|
||||
Underline: "\x1b[4m$<2>",
|
||||
Bold: "\x1b[1m$<2>",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m$<2>",
|
||||
Reverse: "\x1b[7m$<2>",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b(B\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH$<5>",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A$<2>",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyBackspace: "\b",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1bOt",
|
||||
KeyF6: "\x1bOu",
|
||||
KeyF7: "\x1bOv",
|
||||
KeyF8: "\x1bOl",
|
||||
KeyF9: "\x1bOw",
|
||||
KeyF10: "\x1bOx",
|
||||
})
|
||||
}
|
57
vendor/maunium.net/go/tcell/terminfo/term_vt220.go
generated
vendored
Normal file
57
vendor/maunium.net/go/tcell/terminfo/term_vt220.go
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// dec vt220
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt220",
|
||||
Aliases: []string{"vt200"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
AttrOff: "\x1b[m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0$<2>",
|
||||
ExitAcs: "\x1b(B$<4>",
|
||||
EnableAcs: "\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
KeyHelp: "\x1b[28~",
|
||||
})
|
||||
}
|
62
vendor/maunium.net/go/tcell/terminfo/term_vt320.go
generated
vendored
Normal file
62
vendor/maunium.net/go/tcell/terminfo/term_vt320.go
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// dec vt320 7 bit terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt320",
|
||||
Aliases: []string{"vt300"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1b[1~",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[25~",
|
||||
KeyF14: "\x1b[26~",
|
||||
KeyF15: "\x1b[28~",
|
||||
KeyF16: "\x1b[29~",
|
||||
KeyF17: "\x1b[31~",
|
||||
KeyF18: "\x1b[32~",
|
||||
KeyF19: "\x1b[33~",
|
||||
KeyF20: "\x1b[34~",
|
||||
})
|
||||
}
|
45
vendor/maunium.net/go/tcell/terminfo/term_vt400.go
generated
vendored
Normal file
45
vendor/maunium.net/go/tcell/terminfo/term_vt400.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// dec vt400 24x80 column autowrap
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt400",
|
||||
Aliases: []string{"vt400-24", "dec-vt400"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Clear: "\x1b[H\x1b[J$<10/>",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x1b(B",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyBackspace: "\b",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
})
|
||||
}
|
52
vendor/maunium.net/go/tcell/terminfo/term_vt420.go
generated
vendored
Normal file
52
vendor/maunium.net/go/tcell/terminfo/term_vt420.go
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// DEC VT420
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt420",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J$<50>",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x1b(B$<2>",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m$<2>",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Blink: "\x1b[5m$<2>",
|
||||
Reverse: "\x1b[7m$<2>",
|
||||
EnterKeypad: "\x1b=",
|
||||
ExitKeypad: "\x1b>",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0$<2>",
|
||||
ExitAcs: "\x1b(B$<4>",
|
||||
EnableAcs: "\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH$<10>",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1b[A",
|
||||
KeyDown: "\x1b[B",
|
||||
KeyRight: "\x1b[C",
|
||||
KeyLeft: "\x1b[D",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[17~",
|
||||
KeyF6: "\x1b[18~",
|
||||
KeyF7: "\x1b[19~",
|
||||
KeyF8: "\x1b[20~",
|
||||
KeyF9: "\x1b[21~",
|
||||
KeyF10: "\x1b[29~",
|
||||
})
|
||||
}
|
28
vendor/maunium.net/go/tcell/terminfo/term_vt52.go
generated
vendored
Normal file
28
vendor/maunium.net/go/tcell/terminfo/term_vt52.go
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// dec vt52
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "vt52",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1bH\x1bJ",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
PadChar: "\x00",
|
||||
AltChars: "+h.k0affggolpnqprrss",
|
||||
EnterAcs: "\x1bF",
|
||||
ExitAcs: "\x1bG",
|
||||
SetCursor: "\x1bY%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\x1bD",
|
||||
CursorUp1: "\x1bA",
|
||||
KeyUp: "\x1bA",
|
||||
KeyDown: "\x1bB",
|
||||
KeyRight: "\x1bC",
|
||||
KeyLeft: "\x1bD",
|
||||
KeyBackspace: "\b",
|
||||
})
|
||||
}
|
58
vendor/maunium.net/go/tcell/terminfo/term_wy50.go
generated
vendored
Normal file
58
vendor/maunium.net/go/tcell/terminfo/term_wy50.go
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Wyse 50
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "wy50",
|
||||
Aliases: []string{"wyse50"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b+$<20>",
|
||||
ShowCursor: "\x1b`1",
|
||||
HideCursor: "\x1b`0",
|
||||
AttrOff: "\x1b(\x1bH\x03",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b`7\x1b)",
|
||||
Reverse: "\x1b`6\x1b)",
|
||||
PadChar: "\x00",
|
||||
AltChars: "0wa_h[jukslrmqnxqzttuyv]wpxv",
|
||||
EnterAcs: "\x1bH\x02",
|
||||
ExitAcs: "\x1bH\x03",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\n",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyInsert: "\x1bQ",
|
||||
KeyDelete: "\x1bW",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1e",
|
||||
KeyPgUp: "\x1bJ",
|
||||
KeyPgDn: "\x1bK",
|
||||
KeyF1: "\x01@\r",
|
||||
KeyF2: "\x01A\r",
|
||||
KeyF3: "\x01B\r",
|
||||
KeyF4: "\x01C\r",
|
||||
KeyF5: "\x01D\r",
|
||||
KeyF6: "\x01E\r",
|
||||
KeyF7: "\x01F\r",
|
||||
KeyF8: "\x01G\r",
|
||||
KeyF9: "\x01H\r",
|
||||
KeyF10: "\x01I\r",
|
||||
KeyF11: "\x01J\r",
|
||||
KeyF12: "\x01K\r",
|
||||
KeyF13: "\x01L\r",
|
||||
KeyF14: "\x01M\r",
|
||||
KeyF15: "\x01N\r",
|
||||
KeyF16: "\x01O\r",
|
||||
KeyPrint: "\x1bP",
|
||||
KeyBacktab: "\x1bI",
|
||||
KeyShfHome: "\x1b{",
|
||||
})
|
||||
}
|
62
vendor/maunium.net/go/tcell/terminfo/term_wy60.go
generated
vendored
Normal file
62
vendor/maunium.net/go/tcell/terminfo/term_wy60.go
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Wyse 60
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "wy60",
|
||||
Aliases: []string{"wyse60"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b+$<100>",
|
||||
EnterCA: "\x1bw0",
|
||||
ExitCA: "\x1bw1",
|
||||
ShowCursor: "\x1b`1",
|
||||
HideCursor: "\x1b`0",
|
||||
AttrOff: "\x1b(\x1bH\x03\x1bG0\x1bcD",
|
||||
Underline: "\x1bG8",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1bGp",
|
||||
Blink: "\x1bG2",
|
||||
Reverse: "\x1bG4",
|
||||
PadChar: "\x00",
|
||||
AltChars: "+/,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~",
|
||||
EnterAcs: "\x1bcE",
|
||||
ExitAcs: "\x1bcD",
|
||||
SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\v",
|
||||
KeyUp: "\v",
|
||||
KeyDown: "\n",
|
||||
KeyRight: "\f",
|
||||
KeyLeft: "\b",
|
||||
KeyInsert: "\x1bQ",
|
||||
KeyDelete: "\x1bW",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1e",
|
||||
KeyPgUp: "\x1bJ",
|
||||
KeyPgDn: "\x1bK",
|
||||
KeyF1: "\x01@\r",
|
||||
KeyF2: "\x01A\r",
|
||||
KeyF3: "\x01B\r",
|
||||
KeyF4: "\x01C\r",
|
||||
KeyF5: "\x01D\r",
|
||||
KeyF6: "\x01E\r",
|
||||
KeyF7: "\x01F\r",
|
||||
KeyF8: "\x01G\r",
|
||||
KeyF9: "\x01H\r",
|
||||
KeyF10: "\x01I\r",
|
||||
KeyF11: "\x01J\r",
|
||||
KeyF12: "\x01K\r",
|
||||
KeyF13: "\x01L\r",
|
||||
KeyF14: "\x01M\r",
|
||||
KeyF15: "\x01N\r",
|
||||
KeyF16: "\x01O\r",
|
||||
KeyPrint: "\x1bP",
|
||||
KeyBacktab: "\x1bI",
|
||||
KeyShfHome: "\x1b{",
|
||||
})
|
||||
}
|
60
vendor/maunium.net/go/tcell/terminfo/term_wy99_ansi.go
generated
vendored
Normal file
60
vendor/maunium.net/go/tcell/terminfo/term_wy99_ansi.go
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Wyse WY-99GT in ansi mode (int'l PC keyboard)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "wy99-ansi",
|
||||
Columns: 80,
|
||||
Lines: 25,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J$<200>",
|
||||
ShowCursor: "\x1b[34h\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f\x1b[\"q",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h",
|
||||
ExitKeypad: "\x1b[?1l",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b$<1>",
|
||||
CursorUp1: "\x1bM",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyBackspace: "\b",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[M",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF17: "\x1b[K",
|
||||
KeyF18: "\x1b[31~",
|
||||
KeyF19: "\x1b[32~",
|
||||
KeyF20: "\x1b[33~",
|
||||
KeyF21: "\x1b[34~",
|
||||
KeyF22: "\x1b[35~",
|
||||
KeyF23: "\x1b[1~",
|
||||
KeyF24: "\x1b[2~",
|
||||
KeyBacktab: "\x1b[z",
|
||||
})
|
||||
}
|
60
vendor/maunium.net/go/tcell/terminfo/term_wy99a_ansi.go
generated
vendored
Normal file
60
vendor/maunium.net/go/tcell/terminfo/term_wy99a_ansi.go
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Wyse WY-99GT in ansi mode (US PC keyboard)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "wy99a-ansi",
|
||||
Columns: 80,
|
||||
Lines: 25,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[J$<200>",
|
||||
ShowCursor: "\x1b[34h\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[m\x0f\x1b[\"q",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h",
|
||||
ExitKeypad: "\x1b[?1l",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b$<1>",
|
||||
CursorUp1: "\x1bM",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyBackspace: "\b",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[M",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF17: "\x1b[K",
|
||||
KeyF18: "\x1b[31~",
|
||||
KeyF19: "\x1b[32~",
|
||||
KeyF20: "\x1b[33~",
|
||||
KeyF21: "\x1b[34~",
|
||||
KeyF22: "\x1b[35~",
|
||||
KeyF23: "\x1b[1~",
|
||||
KeyF24: "\x1b[2~",
|
||||
KeyBacktab: "\x1b[z",
|
||||
})
|
||||
}
|
155
vendor/maunium.net/go/tcell/terminfo/term_xfce.go
generated
vendored
Normal file
155
vendor/maunium.net/go/tcell/terminfo/term_xfce.go
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Xfce Terminal
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "xfce",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b7\x1b[?47h",
|
||||
ExitCA: "\x1b[2J\x1b[?47l\x1b8",
|
||||
ShowCursor: "\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b[0m\x0f",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x0e",
|
||||
ExitAcs: "\x0f",
|
||||
EnableAcs: "\x1b)0",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1bO1;2P",
|
||||
KeyF14: "\x1bO1;2Q",
|
||||
KeyF15: "\x1bO1;2R",
|
||||
KeyF16: "\x1bO1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1bO1;5P",
|
||||
KeyF26: "\x1bO1;5Q",
|
||||
KeyF27: "\x1bO1;5R",
|
||||
KeyF28: "\x1bO1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1bO1;6P",
|
||||
KeyF38: "\x1bO1;6Q",
|
||||
KeyF39: "\x1bO1;6R",
|
||||
KeyF40: "\x1bO1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1bO1;3P",
|
||||
KeyF50: "\x1bO1;3Q",
|
||||
KeyF51: "\x1bO1;3R",
|
||||
KeyF52: "\x1bO1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1bO1;4P",
|
||||
KeyF62: "\x1bO1;4Q",
|
||||
KeyF63: "\x1bO1;4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
33
vendor/maunium.net/go/tcell/terminfo/term_xnuppc.go
generated
vendored
Normal file
33
vendor/maunium.net/go/tcell/terminfo/term_xnuppc.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// Darwin PowerPC Console (color)
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "xnuppc",
|
||||
Aliases: []string{"darwin"},
|
||||
Colors: 8,
|
||||
Clear: "\x1b[H\x1b[J",
|
||||
AttrOff: "\x1b[m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
PadChar: "\x00",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\x1b[D",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyBackspace: "\u007f",
|
||||
})
|
||||
}
|
156
vendor/maunium.net/go/tcell/terminfo/term_xterm.go
generated
vendored
Normal file
156
vendor/maunium.net/go/tcell/terminfo/term_xterm.go
generated
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// X11 terminal emulator
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "xterm",
|
||||
Aliases: []string{"xterm-debian"},
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 8,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b(B\x1b[m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[3%p1%dm",
|
||||
SetBg: "\x1b[4%p1%dm",
|
||||
SetFgBg: "\x1b[3%p1%d;4%p2%dm",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
155
vendor/maunium.net/go/tcell/terminfo/term_xterm_256color.go
generated
vendored
Normal file
155
vendor/maunium.net/go/tcell/terminfo/term_xterm_256color.go
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// xterm with 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "xterm-256color",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b(B\x1b[m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Italic: "\x1b[3m",
|
||||
Strikethrough: "\x1b[9m",
|
||||
Dim: "\x1b[2m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\u007f",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
155
vendor/maunium.net/go/tcell/terminfo/term_xterm_truecolor.go
generated
vendored
Normal file
155
vendor/maunium.net/go/tcell/terminfo/term_xterm_truecolor.go
generated
vendored
Normal file
@ -0,0 +1,155 @@
|
||||
// Generated automatically. DO NOT HAND-EDIT.
|
||||
|
||||
package terminfo
|
||||
|
||||
func init() {
|
||||
// xterm with 256 colors
|
||||
AddTerminfo(&Terminfo{
|
||||
Name: "xterm-truecolor",
|
||||
Columns: 80,
|
||||
Lines: 24,
|
||||
Colors: 256,
|
||||
Bell: "\a",
|
||||
Clear: "\x1b[H\x1b[2J",
|
||||
EnterCA: "\x1b[?1049h",
|
||||
ExitCA: "\x1b[?1049l",
|
||||
ShowCursor: "\x1b[?12l\x1b[?25h",
|
||||
HideCursor: "\x1b[?25l",
|
||||
AttrOff: "\x1b(B\x1b[m",
|
||||
Underline: "\x1b[4m",
|
||||
Bold: "\x1b[1m",
|
||||
Blink: "\x1b[5m",
|
||||
Reverse: "\x1b[7m",
|
||||
EnterKeypad: "\x1b[?1h\x1b=",
|
||||
ExitKeypad: "\x1b[?1l\x1b>",
|
||||
SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m",
|
||||
SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m",
|
||||
SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m",
|
||||
AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~",
|
||||
EnterAcs: "\x1b(0",
|
||||
ExitAcs: "\x1b(B",
|
||||
SetFgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%dm",
|
||||
SetBgRGB: "\x1b[48;2;%p1%d;%p2%d;%p3%dm",
|
||||
SetFgBgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%d;48;2;%p4%d;%p5%d;%p6%dm",
|
||||
Mouse: "\x1b[M",
|
||||
MouseMode: "%?%p1%{1}%=%t%'h'%Pa%e%'l'%Pa%;\x1b[?1000%ga%c\x1b[?1002%ga%c\x1b[?1003%ga%c\x1b[?1006%ga%c",
|
||||
SetCursor: "\x1b[%i%p1%d;%p2%dH",
|
||||
CursorBack1: "\b",
|
||||
CursorUp1: "\x1b[A",
|
||||
KeyUp: "\x1bOA",
|
||||
KeyDown: "\x1bOB",
|
||||
KeyRight: "\x1bOC",
|
||||
KeyLeft: "\x1bOD",
|
||||
KeyInsert: "\x1b[2~",
|
||||
KeyDelete: "\x1b[3~",
|
||||
KeyBackspace: "\b",
|
||||
KeyHome: "\x1bOH",
|
||||
KeyEnd: "\x1bOF",
|
||||
KeyPgUp: "\x1b[5~",
|
||||
KeyPgDn: "\x1b[6~",
|
||||
KeyF1: "\x1bOP",
|
||||
KeyF2: "\x1bOQ",
|
||||
KeyF3: "\x1bOR",
|
||||
KeyF4: "\x1bOS",
|
||||
KeyF5: "\x1b[15~",
|
||||
KeyF6: "\x1b[17~",
|
||||
KeyF7: "\x1b[18~",
|
||||
KeyF8: "\x1b[19~",
|
||||
KeyF9: "\x1b[20~",
|
||||
KeyF10: "\x1b[21~",
|
||||
KeyF11: "\x1b[23~",
|
||||
KeyF12: "\x1b[24~",
|
||||
KeyF13: "\x1b[1;2P",
|
||||
KeyF14: "\x1b[1;2Q",
|
||||
KeyF15: "\x1b[1;2R",
|
||||
KeyF16: "\x1b[1;2S",
|
||||
KeyF17: "\x1b[15;2~",
|
||||
KeyF18: "\x1b[17;2~",
|
||||
KeyF19: "\x1b[18;2~",
|
||||
KeyF20: "\x1b[19;2~",
|
||||
KeyF21: "\x1b[20;2~",
|
||||
KeyF22: "\x1b[21;2~",
|
||||
KeyF23: "\x1b[23;2~",
|
||||
KeyF24: "\x1b[24;2~",
|
||||
KeyF25: "\x1b[1;5P",
|
||||
KeyF26: "\x1b[1;5Q",
|
||||
KeyF27: "\x1b[1;5R",
|
||||
KeyF28: "\x1b[1;5S",
|
||||
KeyF29: "\x1b[15;5~",
|
||||
KeyF30: "\x1b[17;5~",
|
||||
KeyF31: "\x1b[18;5~",
|
||||
KeyF32: "\x1b[19;5~",
|
||||
KeyF33: "\x1b[20;5~",
|
||||
KeyF34: "\x1b[21;5~",
|
||||
KeyF35: "\x1b[23;5~",
|
||||
KeyF36: "\x1b[24;5~",
|
||||
KeyF37: "\x1b[1;6P",
|
||||
KeyF38: "\x1b[1;6Q",
|
||||
KeyF39: "\x1b[1;6R",
|
||||
KeyF40: "\x1b[1;6S",
|
||||
KeyF41: "\x1b[15;6~",
|
||||
KeyF42: "\x1b[17;6~",
|
||||
KeyF43: "\x1b[18;6~",
|
||||
KeyF44: "\x1b[19;6~",
|
||||
KeyF45: "\x1b[20;6~",
|
||||
KeyF46: "\x1b[21;6~",
|
||||
KeyF47: "\x1b[23;6~",
|
||||
KeyF48: "\x1b[24;6~",
|
||||
KeyF49: "\x1b[1;3P",
|
||||
KeyF50: "\x1b[1;3Q",
|
||||
KeyF51: "\x1b[1;3R",
|
||||
KeyF52: "\x1b[1;3S",
|
||||
KeyF53: "\x1b[15;3~",
|
||||
KeyF54: "\x1b[17;3~",
|
||||
KeyF55: "\x1b[18;3~",
|
||||
KeyF56: "\x1b[19;3~",
|
||||
KeyF57: "\x1b[20;3~",
|
||||
KeyF58: "\x1b[21;3~",
|
||||
KeyF59: "\x1b[23;3~",
|
||||
KeyF60: "\x1b[24;3~",
|
||||
KeyF61: "\x1b[1;4P",
|
||||
KeyF62: "\x1b[1;4Q",
|
||||
KeyF63: "\x1b[1;4R",
|
||||
KeyBacktab: "\x1b[Z",
|
||||
KeyShfLeft: "\x1b[1;2D",
|
||||
KeyShfRight: "\x1b[1;2C",
|
||||
KeyShfUp: "\x1b[1;2A",
|
||||
KeyShfDown: "\x1b[1;2B",
|
||||
KeyCtrlLeft: "\x1b[1;5D",
|
||||
KeyCtrlRight: "\x1b[1;5C",
|
||||
KeyCtrlUp: "\x1b[1;5A",
|
||||
KeyCtrlDown: "\x1b[1;5B",
|
||||
KeyMetaLeft: "\x1b[1;9D",
|
||||
KeyMetaRight: "\x1b[1;9C",
|
||||
KeyMetaUp: "\x1b[1;9A",
|
||||
KeyMetaDown: "\x1b[1;9B",
|
||||
KeyAltLeft: "\x1b[1;3D",
|
||||
KeyAltRight: "\x1b[1;3C",
|
||||
KeyAltUp: "\x1b[1;3A",
|
||||
KeyAltDown: "\x1b[1;3B",
|
||||
KeyAltShfLeft: "\x1b[1;4D",
|
||||
KeyAltShfRight: "\x1b[1;4C",
|
||||
KeyAltShfUp: "\x1b[1;4A",
|
||||
KeyAltShfDown: "\x1b[1;4B",
|
||||
KeyMetaShfLeft: "\x1b[1;10D",
|
||||
KeyMetaShfRight: "\x1b[1;10C",
|
||||
KeyMetaShfUp: "\x1b[1;10A",
|
||||
KeyMetaShfDown: "\x1b[1;10B",
|
||||
KeyCtrlShfLeft: "\x1b[1;6D",
|
||||
KeyCtrlShfRight: "\x1b[1;6C",
|
||||
KeyCtrlShfUp: "\x1b[1;6A",
|
||||
KeyCtrlShfDown: "\x1b[1;6B",
|
||||
KeyShfHome: "\x1b[1;2H",
|
||||
KeyShfEnd: "\x1b[1;2F",
|
||||
KeyCtrlHome: "\x1b[1;5H",
|
||||
KeyCtrlEnd: "\x1b[1;5F",
|
||||
KeyAltHome: "\x1b[1;9H",
|
||||
KeyAltEnd: "\x1b[1;9F",
|
||||
KeyCtrlShfHome: "\x1b[1;6H",
|
||||
KeyCtrlShfEnd: "\x1b[1;6F",
|
||||
KeyMetaShfHome: "\x1b[1;10H",
|
||||
KeyMetaShfEnd: "\x1b[1;10F",
|
||||
KeyAltShfHome: "\x1b[1;4H",
|
||||
KeyAltShfEnd: "\x1b[1;4F",
|
||||
})
|
||||
}
|
841
vendor/maunium.net/go/tcell/terminfo/terminfo.go
generated
vendored
Normal file
841
vendor/maunium.net/go/tcell/terminfo/terminfo.go
generated
vendored
Normal file
@ -0,0 +1,841 @@
|
||||
// Copyright 2017 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package terminfo
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrTermNotFound indicates that a suitable terminal entry could
|
||||
// not be found. This can result from either not having TERM set,
|
||||
// or from the TERM failing to support certain minimal functionality,
|
||||
// in particular absolute cursor addressability (the cup capability)
|
||||
// is required. For example, legacy "adm3" lacks this capability,
|
||||
// whereas the slightly newer "adm3a" supports it. This failure
|
||||
// occurs most often with "dumb".
|
||||
ErrTermNotFound = errors.New("terminal entry not found")
|
||||
)
|
||||
|
||||
// Terminfo represents a terminfo entry. Note that we use friendly names
|
||||
// in Go, but when we write out JSON, we use the same names as terminfo.
|
||||
// The name, aliases and smous, rmous fields do not come from terminfo directly.
|
||||
type Terminfo struct {
|
||||
Name string `json:"name"`
|
||||
Aliases []string `json:"aliases,omitempty"`
|
||||
Columns int `json:"cols,omitempty"` // cols
|
||||
Lines int `json:"lines,omitempty"` // lines
|
||||
Colors int `json:"colors,omitempty"` // colors
|
||||
Bell string `json:"bell,omitempty"` // bell
|
||||
Clear string `json:"clear,omitempty"` // clear
|
||||
EnterCA string `json:"smcup,omitempty"` // smcup
|
||||
ExitCA string `json:"rmcup,omitempty"` // rmcup
|
||||
ShowCursor string `json:"cnorm,omitempty"` // cnorm
|
||||
HideCursor string `json:"civis,omitempty"` // civis
|
||||
AttrOff string `json:"sgr0,omitempty"` // sgr0
|
||||
Underline string `json:"smul,omitempty"` // smul
|
||||
Bold string `json:"bold,omitempty"` // bold
|
||||
Italic string `json:"sitm,omitempty"` // sitm
|
||||
Strikethrough string `json:"strikethrough,omitempty"` // strikethrough
|
||||
Blink string `json:"blink,omitempty"` // blink
|
||||
Reverse string `json:"rev,omitempty"` // rev
|
||||
Dim string `json:"dim,omitempty"` // dim
|
||||
EnterKeypad string `json:"smkx,omitempty"` // smkx
|
||||
ExitKeypad string `json:"rmkx,omitempty"` // rmkx
|
||||
SetFg string `json:"setaf,omitempty"` // setaf
|
||||
SetBg string `json:"setbg,omitempty"` // setab
|
||||
SetCursor string `json:"cup,omitempty"` // cup
|
||||
CursorBack1 string `json:"cub1,omitempty"` // cub1
|
||||
CursorUp1 string `json:"cuu1,omitempty"` // cuu1
|
||||
PadChar string `json:"pad,omitempty"` // pad
|
||||
KeyBackspace string `json:"kbs,omitempty"` // kbs
|
||||
KeyF1 string `json:"kf1,omitempty"` // kf1
|
||||
KeyF2 string `json:"kf2,omitempty"` // kf2
|
||||
KeyF3 string `json:"kf3,omitempty"` // kf3
|
||||
KeyF4 string `json:"kf4,omitempty"` // kf4
|
||||
KeyF5 string `json:"kf5,omitempty"` // kf5
|
||||
KeyF6 string `json:"kf6,omitempty"` // kf6
|
||||
KeyF7 string `json:"kf7,omitempty"` // kf7
|
||||
KeyF8 string `json:"kf8,omitempty"` // kf8
|
||||
KeyF9 string `json:"kf9,omitempty"` // kf9
|
||||
KeyF10 string `json:"kf10,omitempty"` // kf10
|
||||
KeyF11 string `json:"kf11,omitempty"` // kf11
|
||||
KeyF12 string `json:"kf12,omitempty"` // kf12
|
||||
KeyF13 string `json:"kf13,omitempty"` // kf13
|
||||
KeyF14 string `json:"kf14,omitempty"` // kf14
|
||||
KeyF15 string `json:"kf15,omitempty"` // kf15
|
||||
KeyF16 string `json:"kf16,omitempty"` // kf16
|
||||
KeyF17 string `json:"kf17,omitempty"` // kf17
|
||||
KeyF18 string `json:"kf18,omitempty"` // kf18
|
||||
KeyF19 string `json:"kf19,omitempty"` // kf19
|
||||
KeyF20 string `json:"kf20,omitempty"` // kf20
|
||||
KeyF21 string `json:"kf21,omitempty"` // kf21
|
||||
KeyF22 string `json:"kf22,omitempty"` // kf22
|
||||
KeyF23 string `json:"kf23,omitempty"` // kf23
|
||||
KeyF24 string `json:"kf24,omitempty"` // kf24
|
||||
KeyF25 string `json:"kf25,omitempty"` // kf25
|
||||
KeyF26 string `json:"kf26,omitempty"` // kf26
|
||||
KeyF27 string `json:"kf27,omitempty"` // kf27
|
||||
KeyF28 string `json:"kf28,omitempty"` // kf28
|
||||
KeyF29 string `json:"kf29,omitempty"` // kf29
|
||||
KeyF30 string `json:"kf30,omitempty"` // kf30
|
||||
KeyF31 string `json:"kf31,omitempty"` // kf31
|
||||
KeyF32 string `json:"kf32,omitempty"` // kf32
|
||||
KeyF33 string `json:"kf33,omitempty"` // kf33
|
||||
KeyF34 string `json:"kf34,omitempty"` // kf34
|
||||
KeyF35 string `json:"kf35,omitempty"` // kf35
|
||||
KeyF36 string `json:"kf36,omitempty"` // kf36
|
||||
KeyF37 string `json:"kf37,omitempty"` // kf37
|
||||
KeyF38 string `json:"kf38,omitempty"` // kf38
|
||||
KeyF39 string `json:"kf39,omitempty"` // kf39
|
||||
KeyF40 string `json:"kf40,omitempty"` // kf40
|
||||
KeyF41 string `json:"kf41,omitempty"` // kf41
|
||||
KeyF42 string `json:"kf42,omitempty"` // kf42
|
||||
KeyF43 string `json:"kf43,omitempty"` // kf43
|
||||
KeyF44 string `json:"kf44,omitempty"` // kf44
|
||||
KeyF45 string `json:"kf45,omitempty"` // kf45
|
||||
KeyF46 string `json:"kf46,omitempty"` // kf46
|
||||
KeyF47 string `json:"kf47,omitempty"` // kf47
|
||||
KeyF48 string `json:"kf48,omitempty"` // kf48
|
||||
KeyF49 string `json:"kf49,omitempty"` // kf49
|
||||
KeyF50 string `json:"kf50,omitempty"` // kf50
|
||||
KeyF51 string `json:"kf51,omitempty"` // kf51
|
||||
KeyF52 string `json:"kf52,omitempty"` // kf52
|
||||
KeyF53 string `json:"kf53,omitempty"` // kf53
|
||||
KeyF54 string `json:"kf54,omitempty"` // kf54
|
||||
KeyF55 string `json:"kf55,omitempty"` // kf55
|
||||
KeyF56 string `json:"kf56,omitempty"` // kf56
|
||||
KeyF57 string `json:"kf57,omitempty"` // kf57
|
||||
KeyF58 string `json:"kf58,omitempty"` // kf58
|
||||
KeyF59 string `json:"kf59,omitempty"` // kf59
|
||||
KeyF60 string `json:"kf60,omitempty"` // kf60
|
||||
KeyF61 string `json:"kf61,omitempty"` // kf61
|
||||
KeyF62 string `json:"kf62,omitempty"` // kf62
|
||||
KeyF63 string `json:"kf63,omitempty"` // kf63
|
||||
KeyF64 string `json:"kf64,omitempty"` // kf64
|
||||
KeyInsert string `json:"kich,omitempty"` // kich1
|
||||
KeyDelete string `json:"kdch,omitempty"` // kdch1
|
||||
KeyHome string `json:"khome,omitempty"` // khome
|
||||
KeyEnd string `json:"kend,omitempty"` // kend
|
||||
KeyHelp string `json:"khlp,omitempty"` // khlp
|
||||
KeyPgUp string `json:"kpp,omitempty"` // kpp
|
||||
KeyPgDn string `json:"knp,omitempty"` // knp
|
||||
KeyUp string `json:"kcuu1,omitempty"` // kcuu1
|
||||
KeyDown string `json:"kcud1,omitempty"` // kcud1
|
||||
KeyLeft string `json:"kcub1,omitempty"` // kcub1
|
||||
KeyRight string `json:"kcuf1,omitempty"` // kcuf1
|
||||
KeyBacktab string `json:"kcbt,omitempty"` // kcbt
|
||||
KeyExit string `json:"kext,omitempty"` // kext
|
||||
KeyClear string `json:"kclr,omitempty"` // kclr
|
||||
KeyPrint string `json:"kprt,omitempty"` // kprt
|
||||
KeyCancel string `json:"kcan,omitempty"` // kcan
|
||||
Mouse string `json:"kmous,omitempty"` // kmous
|
||||
MouseMode string `json:"XM,omitempty"` // XM
|
||||
AltChars string `json:"acsc,omitempty"` // acsc
|
||||
EnterAcs string `json:"smacs,omitempty"` // smacs
|
||||
ExitAcs string `json:"rmacs,omitempty"` // rmacs
|
||||
EnableAcs string `json:"enacs,omitempty"` // enacs
|
||||
KeyShfRight string `json:"kRIT,omitempty"` // kRIT
|
||||
KeyShfLeft string `json:"kLFT,omitempty"` // kLFT
|
||||
KeyShfHome string `json:"kHOM,omitempty"` // kHOM
|
||||
KeyShfEnd string `json:"kEND,omitempty"` // kEND
|
||||
|
||||
// These are non-standard extensions to terminfo. This includes
|
||||
// true color support, and some additional keys. Its kind of bizarre
|
||||
// that shifted variants of left and right exist, but not up and down.
|
||||
// Terminal support for these are going to vary amongst XTerm
|
||||
// emulations, so don't depend too much on them in your application.
|
||||
|
||||
SetFgBg string `json:"_setfgbg,omitempty"` // setfgbg
|
||||
SetFgBgRGB string `json:"_setfgbgrgb,omitempty"` // setfgbgrgb
|
||||
SetFgRGB string `json:"_setfrgb,omitempty"` // setfrgb
|
||||
SetBgRGB string `json:"_setbrgb,omitempty"` // setbrgb
|
||||
KeyShfUp string `json:"_kscu1,omitempty"` // shift-up
|
||||
KeyShfDown string `json:"_kscud1,omitempty"` // shift-down
|
||||
KeyCtrlUp string `json:"_kccu1,omitempty"` // ctrl-up
|
||||
KeyCtrlDown string `json:"_kccud1,omitempty"` // ctrl-left
|
||||
KeyCtrlRight string `json:"_kccuf1,omitempty"` // ctrl-right
|
||||
KeyCtrlLeft string `json:"_kccub1,omitempty"` // ctrl-left
|
||||
KeyMetaUp string `json:"_kmcu1,omitempty"` // meta-up
|
||||
KeyMetaDown string `json:"_kmcud1,omitempty"` // meta-left
|
||||
KeyMetaRight string `json:"_kmcuf1,omitempty"` // meta-right
|
||||
KeyMetaLeft string `json:"_kmcub1,omitempty"` // meta-left
|
||||
KeyAltUp string `json:"_kacu1,omitempty"` // alt-up
|
||||
KeyAltDown string `json:"_kacud1,omitempty"` // alt-left
|
||||
KeyAltRight string `json:"_kacuf1,omitempty"` // alt-right
|
||||
KeyAltLeft string `json:"_kacub1,omitempty"` // alt-left
|
||||
KeyCtrlHome string `json:"_kchome,omitempty"`
|
||||
KeyCtrlEnd string `json:"_kcend,omitempty"`
|
||||
KeyMetaHome string `json:"_kmhome,omitempty"`
|
||||
KeyMetaEnd string `json:"_kmend,omitempty"`
|
||||
KeyAltHome string `json:"_kahome,omitempty"`
|
||||
KeyAltEnd string `json:"_kaend,omitempty"`
|
||||
KeyAltShfUp string `json:"_kascu1,omitempty"`
|
||||
KeyAltShfDown string `json:"_kascud1,omitempty"`
|
||||
KeyAltShfLeft string `json:"_kascub1,omitempty"`
|
||||
KeyAltShfRight string `json:"_kascuf1,omitempty"`
|
||||
KeyMetaShfUp string `json:"_kmscu1,omitempty"`
|
||||
KeyMetaShfDown string `json:"_kmscud1,omitempty"`
|
||||
KeyMetaShfLeft string `json:"_kmscub1,omitempty"`
|
||||
KeyMetaShfRight string `json:"_kmscuf1,omitempty"`
|
||||
KeyCtrlShfUp string `json:"_kcscu1,omitempty"`
|
||||
KeyCtrlShfDown string `json:"_kcscud1,omitempty"`
|
||||
KeyCtrlShfLeft string `json:"_kcscub1,omitempty"`
|
||||
KeyCtrlShfRight string `json:"_kcscuf1,omitempty"`
|
||||
KeyCtrlShfHome string `json:"_kcHOME,omitempty"`
|
||||
KeyCtrlShfEnd string `json:"_kcEND,omitempty"`
|
||||
KeyAltShfHome string `json:"_kaHOME,omitempty"`
|
||||
KeyAltShfEnd string `json:"_kaEND,omitempty"`
|
||||
KeyMetaShfHome string `json:"_kmHOME,omitempty"`
|
||||
KeyMetaShfEnd string `json:"_kmEND,omitempty"`
|
||||
KeyCtrlPgUp string
|
||||
KeyCtrlPgDn string
|
||||
}
|
||||
|
||||
type stackElem struct {
|
||||
s string
|
||||
i int
|
||||
isStr bool
|
||||
isInt bool
|
||||
}
|
||||
|
||||
type stack []stackElem
|
||||
|
||||
func (st stack) Push(v string) stack {
|
||||
e := stackElem{
|
||||
s: v,
|
||||
isStr: true,
|
||||
}
|
||||
return append(st, e)
|
||||
}
|
||||
|
||||
func (st stack) Pop() (string, stack) {
|
||||
v := ""
|
||||
if len(st) > 0 {
|
||||
e := st[len(st)-1]
|
||||
st = st[:len(st)-1]
|
||||
if e.isStr {
|
||||
v = e.s
|
||||
} else {
|
||||
v = strconv.Itoa(e.i)
|
||||
}
|
||||
}
|
||||
return v, st
|
||||
}
|
||||
|
||||
func (st stack) PopInt() (int, stack) {
|
||||
if len(st) > 0 {
|
||||
e := st[len(st)-1]
|
||||
st = st[:len(st)-1]
|
||||
if e.isInt {
|
||||
return e.i, st
|
||||
} else if e.isStr {
|
||||
i, _ := strconv.Atoi(e.s)
|
||||
return i, st
|
||||
}
|
||||
}
|
||||
return 0, st
|
||||
}
|
||||
|
||||
func (st stack) PopBool() (bool, stack) {
|
||||
if len(st) > 0 {
|
||||
e := st[len(st)-1]
|
||||
st = st[:len(st)-1]
|
||||
if e.isStr {
|
||||
if e.s == "1" {
|
||||
return true, st
|
||||
}
|
||||
return false, st
|
||||
} else if e.i == 1 {
|
||||
return true, st
|
||||
} else {
|
||||
return false, st
|
||||
}
|
||||
}
|
||||
return false, st
|
||||
}
|
||||
|
||||
func (st stack) PushInt(i int) stack {
|
||||
e := stackElem{
|
||||
i: i,
|
||||
isInt: true,
|
||||
}
|
||||
return append(st, e)
|
||||
}
|
||||
|
||||
func (st stack) PushBool(i bool) stack {
|
||||
if i {
|
||||
return st.PushInt(1)
|
||||
}
|
||||
return st.PushInt(0)
|
||||
}
|
||||
|
||||
func nextch(s string, index int) (byte, int) {
|
||||
if index < len(s) {
|
||||
return s[index], index + 1
|
||||
}
|
||||
return 0, index
|
||||
}
|
||||
|
||||
// static vars
|
||||
var svars [26]string
|
||||
|
||||
// paramsBuffer handles some persistent state for TParam. Technically we
|
||||
// could probably dispense with this, but caching buffer arrays gives us
|
||||
// a nice little performance boost. Furthermore, we know that TParam is
|
||||
// rarely (never?) called re-entrantly, so we can just reuse the same
|
||||
// buffers, making it thread-safe by stashing a lock.
|
||||
type paramsBuffer struct {
|
||||
out bytes.Buffer
|
||||
buf bytes.Buffer
|
||||
lk sync.Mutex
|
||||
}
|
||||
|
||||
// Start initializes the params buffer with the initial string data.
|
||||
// It also locks the paramsBuffer. The caller must call End() when
|
||||
// finished.
|
||||
func (pb *paramsBuffer) Start(s string) {
|
||||
pb.lk.Lock()
|
||||
pb.out.Reset()
|
||||
pb.buf.Reset()
|
||||
pb.buf.WriteString(s)
|
||||
}
|
||||
|
||||
// End returns the final output from TParam, but it also releases the lock.
|
||||
func (pb *paramsBuffer) End() string {
|
||||
s := pb.out.String()
|
||||
pb.lk.Unlock()
|
||||
return s
|
||||
}
|
||||
|
||||
// NextCh returns the next input character to the expander.
|
||||
func (pb *paramsBuffer) NextCh() (byte, error) {
|
||||
return pb.buf.ReadByte()
|
||||
}
|
||||
|
||||
// PutCh "emits" (rather schedules for output) a single byte character.
|
||||
func (pb *paramsBuffer) PutCh(ch byte) {
|
||||
pb.out.WriteByte(ch)
|
||||
}
|
||||
|
||||
// PutString schedules a string for output.
|
||||
func (pb *paramsBuffer) PutString(s string) {
|
||||
pb.out.WriteString(s)
|
||||
}
|
||||
|
||||
var pb = ¶msBuffer{}
|
||||
|
||||
// TParm takes a terminfo parameterized string, such as setaf or cup, and
|
||||
// evaluates the string, and returns the result with the parameter
|
||||
// applied.
|
||||
func (t *Terminfo) TParm(s string, p ...int) string {
|
||||
var stk stack
|
||||
var a, b string
|
||||
var ai, bi int
|
||||
var ab bool
|
||||
var dvars [26]string
|
||||
var params [9]int
|
||||
|
||||
pb.Start(s)
|
||||
|
||||
// make sure we always have 9 parameters -- makes it easier
|
||||
// later to skip checks
|
||||
for i := 0; i < len(params) && i < len(p); i++ {
|
||||
params[i] = p[i]
|
||||
}
|
||||
|
||||
nest := 0
|
||||
|
||||
for {
|
||||
|
||||
ch, err := pb.NextCh()
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
|
||||
if ch != '%' {
|
||||
pb.PutCh(ch)
|
||||
continue
|
||||
}
|
||||
|
||||
ch, err = pb.NextCh()
|
||||
if err != nil {
|
||||
// XXX Error
|
||||
break
|
||||
}
|
||||
|
||||
switch ch {
|
||||
case '%': // quoted %
|
||||
pb.PutCh(ch)
|
||||
|
||||
case 'i': // increment both parameters (ANSI cup support)
|
||||
params[0]++
|
||||
params[1]++
|
||||
|
||||
case 'c', 's':
|
||||
// NB: these, and 'd' below are special cased for
|
||||
// efficiency. They could be handled by the richer
|
||||
// format support below, less efficiently.
|
||||
a, stk = stk.Pop()
|
||||
pb.PutString(a)
|
||||
|
||||
case 'd':
|
||||
ai, stk = stk.PopInt()
|
||||
pb.PutString(strconv.Itoa(ai))
|
||||
|
||||
case '0', '1', '2', '3', '4', 'x', 'X', 'o', ':':
|
||||
// This is pretty suboptimal, but this is rarely used.
|
||||
// None of the mainstream terminals use any of this,
|
||||
// and it would surprise me if this code is ever
|
||||
// executed outside of test cases.
|
||||
f := "%"
|
||||
if ch == ':' {
|
||||
ch, _ = pb.NextCh()
|
||||
}
|
||||
f += string(ch)
|
||||
for ch == '+' || ch == '-' || ch == '#' || ch == ' ' {
|
||||
ch, _ = pb.NextCh()
|
||||
f += string(ch)
|
||||
}
|
||||
for (ch >= '0' && ch <= '9') || ch == '.' {
|
||||
ch, _ = pb.NextCh()
|
||||
f += string(ch)
|
||||
}
|
||||
switch ch {
|
||||
case 'd', 'x', 'X', 'o':
|
||||
ai, stk = stk.PopInt()
|
||||
pb.PutString(fmt.Sprintf(f, ai))
|
||||
case 'c', 's':
|
||||
a, stk = stk.Pop()
|
||||
pb.PutString(fmt.Sprintf(f, a))
|
||||
}
|
||||
|
||||
case 'p': // push parameter
|
||||
ch, _ = pb.NextCh()
|
||||
ai = int(ch - '1')
|
||||
if ai >= 0 && ai < len(params) {
|
||||
stk = stk.PushInt(params[ai])
|
||||
} else {
|
||||
stk = stk.PushInt(0)
|
||||
}
|
||||
|
||||
case 'P': // pop & store variable
|
||||
ch, _ = pb.NextCh()
|
||||
if ch >= 'A' && ch <= 'Z' {
|
||||
svars[int(ch-'A')], stk = stk.Pop()
|
||||
} else if ch >= 'a' && ch <= 'z' {
|
||||
dvars[int(ch-'a')], stk = stk.Pop()
|
||||
}
|
||||
|
||||
case 'g': // recall & push variable
|
||||
ch, _ = pb.NextCh()
|
||||
if ch >= 'A' && ch <= 'Z' {
|
||||
stk = stk.Push(svars[int(ch-'A')])
|
||||
} else if ch >= 'a' && ch <= 'z' {
|
||||
stk = stk.Push(dvars[int(ch-'a')])
|
||||
}
|
||||
|
||||
case '\'': // push(char)
|
||||
ch, _ = pb.NextCh()
|
||||
pb.NextCh() // must be ' but we don't check
|
||||
stk = stk.Push(string(ch))
|
||||
|
||||
case '{': // push(int)
|
||||
ai = 0
|
||||
ch, _ = pb.NextCh()
|
||||
for ch >= '0' && ch <= '9' {
|
||||
ai *= 10
|
||||
ai += int(ch - '0')
|
||||
ch, _ = pb.NextCh()
|
||||
}
|
||||
// ch must be '}' but no verification
|
||||
stk = stk.PushInt(ai)
|
||||
|
||||
case 'l': // push(strlen(pop))
|
||||
a, stk = stk.Pop()
|
||||
stk = stk.PushInt(len(a))
|
||||
|
||||
case '+':
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai + bi)
|
||||
|
||||
case '-':
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai - bi)
|
||||
|
||||
case '*':
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai * bi)
|
||||
|
||||
case '/':
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
if bi != 0 {
|
||||
stk = stk.PushInt(ai / bi)
|
||||
} else {
|
||||
stk = stk.PushInt(0)
|
||||
}
|
||||
|
||||
case 'm': // push(pop mod pop)
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
if bi != 0 {
|
||||
stk = stk.PushInt(ai % bi)
|
||||
} else {
|
||||
stk = stk.PushInt(0)
|
||||
}
|
||||
|
||||
case '&': // AND
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai & bi)
|
||||
|
||||
case '|': // OR
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai | bi)
|
||||
|
||||
case '^': // XOR
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai ^ bi)
|
||||
|
||||
case '~': // bit complement
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushInt(ai ^ -1)
|
||||
|
||||
case '!': // logical NOT
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushBool(ai != 0)
|
||||
|
||||
case '=': // numeric compare or string compare
|
||||
b, stk = stk.Pop()
|
||||
a, stk = stk.Pop()
|
||||
stk = stk.PushBool(a == b)
|
||||
|
||||
case '>': // greater than, numeric
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushBool(ai > bi)
|
||||
|
||||
case '<': // less than, numeric
|
||||
bi, stk = stk.PopInt()
|
||||
ai, stk = stk.PopInt()
|
||||
stk = stk.PushBool(ai < bi)
|
||||
|
||||
case '?': // start conditional
|
||||
|
||||
case 't':
|
||||
ab, stk = stk.PopBool()
|
||||
if ab {
|
||||
// just keep going
|
||||
break
|
||||
}
|
||||
nest = 0
|
||||
ifloop:
|
||||
// this loop consumes everything until we hit our else,
|
||||
// or the end of the conditional
|
||||
for {
|
||||
ch, err = pb.NextCh()
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
if ch != '%' {
|
||||
continue
|
||||
}
|
||||
ch, _ = pb.NextCh()
|
||||
switch ch {
|
||||
case ';':
|
||||
if nest == 0 {
|
||||
break ifloop
|
||||
}
|
||||
nest--
|
||||
case '?':
|
||||
nest++
|
||||
case 'e':
|
||||
if nest == 0 {
|
||||
break ifloop
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case 'e':
|
||||
// if we got here, it means we didn't use the else
|
||||
// in the 't' case above, and we should skip until
|
||||
// the end of the conditional
|
||||
nest = 0
|
||||
elloop:
|
||||
for {
|
||||
ch, err = pb.NextCh()
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
if ch != '%' {
|
||||
continue
|
||||
}
|
||||
ch, _ = pb.NextCh()
|
||||
switch ch {
|
||||
case ';':
|
||||
if nest == 0 {
|
||||
break elloop
|
||||
}
|
||||
nest--
|
||||
case '?':
|
||||
nest++
|
||||
}
|
||||
}
|
||||
|
||||
case ';': // endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return pb.End()
|
||||
}
|
||||
|
||||
// TPuts emits the string to the writer, but expands inline padding
|
||||
// indications (of the form $<[delay]> where [delay] is msec) to
|
||||
// a suitable number of padding characters (usually null bytes) based
|
||||
// upon the supplied baud. At high baud rates, more padding characters
|
||||
// will be inserted. All Terminfo based strings should be emitted using
|
||||
// this function.
|
||||
func (t *Terminfo) TPuts(w io.Writer, s string, baud int) {
|
||||
for {
|
||||
beg := strings.Index(s, "$<")
|
||||
if beg < 0 {
|
||||
// Most strings don't need padding, which is good news!
|
||||
io.WriteString(w, s)
|
||||
return
|
||||
}
|
||||
io.WriteString(w, s[:beg])
|
||||
s = s[beg+2:]
|
||||
end := strings.Index(s, ">")
|
||||
if end < 0 {
|
||||
// unterminated.. just emit bytes unadulterated
|
||||
io.WriteString(w, "$<"+s)
|
||||
return
|
||||
}
|
||||
val := s[:end]
|
||||
s = s[end+1:]
|
||||
padus := 0
|
||||
unit := 1000
|
||||
dot := false
|
||||
loop:
|
||||
for i := range val {
|
||||
switch val[i] {
|
||||
case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
|
||||
padus *= 10
|
||||
padus += int(val[i] - '0')
|
||||
if dot {
|
||||
unit *= 10
|
||||
}
|
||||
case '.':
|
||||
if !dot {
|
||||
dot = true
|
||||
} else {
|
||||
break loop
|
||||
}
|
||||
default:
|
||||
break loop
|
||||
}
|
||||
}
|
||||
cnt := int(((baud / 8) * padus) / unit)
|
||||
for cnt > 0 {
|
||||
io.WriteString(w, t.PadChar)
|
||||
cnt--
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TGoto returns a string suitable for addressing the cursor at the given
|
||||
// row and column. The origin 0, 0 is in the upper left corner of the screen.
|
||||
func (t *Terminfo) TGoto(col, row int) string {
|
||||
return t.TParm(t.SetCursor, row, col)
|
||||
}
|
||||
|
||||
// TColor returns a string corresponding to the given foreground and background
|
||||
// colors. Either fg or bg can be set to -1 to elide.
|
||||
func (t *Terminfo) TColor(fi, bi int) string {
|
||||
rv := ""
|
||||
// As a special case, we map bright colors to lower versions if the
|
||||
// color table only holds 8. For the remaining 240 colors, the user
|
||||
// is out of luck. Someday we could create a mapping table, but its
|
||||
// not worth it.
|
||||
if t.Colors == 8 {
|
||||
if fi > 7 && fi < 16 {
|
||||
fi -= 8
|
||||
}
|
||||
if bi > 7 && bi < 16 {
|
||||
bi -= 8
|
||||
}
|
||||
}
|
||||
if t.Colors > fi && fi >= 0 {
|
||||
rv += t.TParm(t.SetFg, fi)
|
||||
}
|
||||
if t.Colors > bi && bi >= 0 {
|
||||
rv += t.TParm(t.SetBg, bi)
|
||||
}
|
||||
return rv
|
||||
}
|
||||
|
||||
var (
|
||||
dblock sync.Mutex
|
||||
terminfos = make(map[string]*Terminfo)
|
||||
aliases = make(map[string]string)
|
||||
)
|
||||
|
||||
// AddTerminfo can be called to register a new Terminfo entry.
|
||||
func AddTerminfo(t *Terminfo) {
|
||||
dblock.Lock()
|
||||
terminfos[t.Name] = t
|
||||
for _, x := range t.Aliases {
|
||||
terminfos[x] = t
|
||||
}
|
||||
dblock.Unlock()
|
||||
}
|
||||
|
||||
func loadFromFile(fname string, term string) (*Terminfo, error) {
|
||||
var e error
|
||||
var f io.Reader
|
||||
if f, e = os.Open(fname); e != nil {
|
||||
return nil, e
|
||||
}
|
||||
if strings.HasSuffix(fname, ".gz") {
|
||||
if f, e = gzip.NewReader(f); e != nil {
|
||||
return nil, e
|
||||
}
|
||||
}
|
||||
d := json.NewDecoder(f)
|
||||
for {
|
||||
t := &Terminfo{}
|
||||
if e := d.Decode(t); e != nil {
|
||||
if e == io.EOF {
|
||||
return nil, ErrTermNotFound
|
||||
}
|
||||
return nil, e
|
||||
}
|
||||
if t.SetCursor == "" {
|
||||
// This must be an alias record, return it.
|
||||
return t, nil
|
||||
}
|
||||
if t.Name == term {
|
||||
return t, nil
|
||||
}
|
||||
for _, a := range t.Aliases {
|
||||
if a == term {
|
||||
return t, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LookupTerminfo attempts to find a definition for the named $TERM.
|
||||
// It first looks in the builtin database, which should cover just about
|
||||
// everyone. If it can't find one there, then it will attempt to read
|
||||
// one from the JSON file located in either $TCELLDB, $HOME/.tcelldb
|
||||
// or in this package's source directory as database.json).
|
||||
func LookupTerminfo(name string) (*Terminfo, error) {
|
||||
if name == "" {
|
||||
// else on windows: index out of bounds
|
||||
// on the name[0] reference below
|
||||
return nil, ErrTermNotFound
|
||||
}
|
||||
|
||||
dblock.Lock()
|
||||
t := terminfos[name]
|
||||
dblock.Unlock()
|
||||
|
||||
if t == nil {
|
||||
|
||||
var files []string
|
||||
letter := fmt.Sprintf("%02x", name[0])
|
||||
gzfile := path.Join(letter, name+".gz")
|
||||
jsfile := path.Join(letter, name)
|
||||
|
||||
// Build up the search path. Old versions of tcell used a
|
||||
// single database file, whereas the new ones locate them
|
||||
// in JSON (optionally compressed) files.
|
||||
//
|
||||
// The search path looks like:
|
||||
//
|
||||
// $TCELLDB/x/xterm.gz
|
||||
// $TCELLDB/x/xterm
|
||||
// $TCELLDB
|
||||
// $HOME/.tcelldb/x/xterm.gz
|
||||
// $HOME/.tcelldb/x/xterm
|
||||
// $HOME/.tcelldb
|
||||
// $GOPATH/terminfo/database/x/xterm.gz
|
||||
// $GOPATH/terminfo/database/x/xterm
|
||||
//
|
||||
if pth := os.Getenv("TCELLDB"); pth != "" {
|
||||
files = append(files, path.Join(pth, gzfile))
|
||||
files = append(files, path.Join(pth, jsfile))
|
||||
files = append(files, pth)
|
||||
}
|
||||
if pth := os.Getenv("HOME"); pth != "" {
|
||||
pth = path.Join(pth, ".tcelldb")
|
||||
files = append(files, path.Join(pth, gzfile))
|
||||
files = append(files, path.Join(pth, jsfile))
|
||||
files = append(files, pth)
|
||||
}
|
||||
|
||||
for _, pth := range strings.Split(os.Getenv("GOPATH"), string(os.PathListSeparator)) {
|
||||
pth = path.Join(pth, "src", "github.com", "gdamore", "tcell", "terminfo", "database")
|
||||
files = append(files, path.Join(pth, gzfile))
|
||||
files = append(files, path.Join(pth, jsfile))
|
||||
}
|
||||
|
||||
for _, fname := range files {
|
||||
t, _ = loadFromFile(fname, name)
|
||||
if t != nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
if t != nil {
|
||||
if t.Name != name {
|
||||
// Check for a database loop (no infinite
|
||||
// recursion).
|
||||
dblock.Lock()
|
||||
if aliases[name] != "" {
|
||||
dblock.Unlock()
|
||||
return nil, ErrTermNotFound
|
||||
}
|
||||
aliases[name] = t.Name
|
||||
dblock.Unlock()
|
||||
return LookupTerminfo(t.Name)
|
||||
}
|
||||
dblock.Lock()
|
||||
terminfos[name] = t
|
||||
dblock.Unlock()
|
||||
}
|
||||
}
|
||||
if t == nil {
|
||||
return nil, ErrTermNotFound
|
||||
}
|
||||
return t, nil
|
||||
}
|
1524
vendor/maunium.net/go/tcell/tscreen.go
generated
vendored
Normal file
1524
vendor/maunium.net/go/tcell/tscreen.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
119
vendor/maunium.net/go/tcell/tscreen_bsd.go
generated
vendored
Normal file
119
vendor/maunium.net/go/tcell/tscreen_bsd.go
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
// +build freebsd netbsd openbsd dragonfly
|
||||
|
||||
// Copyright 2018 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type termiosPrivate syscall.Termios
|
||||
|
||||
func (t *tScreen) termioInit() error {
|
||||
var e error
|
||||
var newtios termiosPrivate
|
||||
var fd uintptr
|
||||
var tios uintptr
|
||||
var ioc uintptr
|
||||
t.tiosp = &termiosPrivate{}
|
||||
|
||||
if t.in, e = os.OpenFile("/dev/tty", os.O_RDONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
if t.out, e = os.OpenFile("/dev/tty", os.O_WRONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
|
||||
tios = uintptr(unsafe.Pointer(t.tiosp))
|
||||
ioc = uintptr(syscall.TIOCGETA)
|
||||
fd = uintptr(t.out.(*os.File).Fd())
|
||||
if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 {
|
||||
e = e1
|
||||
goto failed
|
||||
}
|
||||
|
||||
// On this platform (FreeBSD and family), the baud rate is stored
|
||||
// directly as an integer in termios.c_ospeed. No bitmasking required.
|
||||
t.baud = int(t.tiosp.Ospeed)
|
||||
newtios = *t.tiosp
|
||||
newtios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK |
|
||||
syscall.ISTRIP | syscall.INLCR | syscall.IGNCR |
|
||||
syscall.ICRNL | syscall.IXON
|
||||
newtios.Oflag &^= syscall.OPOST
|
||||
newtios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON |
|
||||
syscall.ISIG | syscall.IEXTEN
|
||||
newtios.Cflag &^= syscall.CSIZE | syscall.PARENB
|
||||
newtios.Cflag |= syscall.CS8
|
||||
|
||||
tios = uintptr(unsafe.Pointer(&newtios))
|
||||
|
||||
ioc = uintptr(syscall.TIOCSETA)
|
||||
if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 {
|
||||
e = e1
|
||||
goto failed
|
||||
}
|
||||
|
||||
signal.Notify(t.sigwinch, syscall.SIGWINCH)
|
||||
|
||||
if w, h, e := t.getWinSize(); e == nil && w != 0 && h != 0 {
|
||||
t.cells.Resize(w, h)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
failed:
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
if t.out != nil {
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
func (t *tScreen) termioFini() {
|
||||
|
||||
signal.Stop(t.sigwinch)
|
||||
|
||||
<-t.indoneq
|
||||
|
||||
if t.out != nil {
|
||||
fd := uintptr(t.out.(*os.File).Fd())
|
||||
ioc := uintptr(syscall.TIOCSETAF)
|
||||
tios := uintptr(unsafe.Pointer(t.tiosp))
|
||||
syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0)
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (t *tScreen) getWinSize() (int, int, error) {
|
||||
|
||||
fd := uintptr(t.out.(*os.File).Fd())
|
||||
dim := [4]uint16{}
|
||||
dimp := uintptr(unsafe.Pointer(&dim))
|
||||
ioc := uintptr(syscall.TIOCGWINSZ)
|
||||
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL,
|
||||
fd, ioc, dimp, 0, 0, 0); err != 0 {
|
||||
return -1, -1, err
|
||||
}
|
||||
return int(dim[1]), int(dim[0]), nil
|
||||
}
|
140
vendor/maunium.net/go/tcell/tscreen_darwin.go
generated
vendored
Normal file
140
vendor/maunium.net/go/tcell/tscreen_darwin.go
generated
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
// +build darwin
|
||||
|
||||
// Copyright 2018 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// The Darwin system is *almost* a real BSD system, but it suffers from
|
||||
// a brain damaged TTY driver. This TTY driver does not actually
|
||||
// wake up in poll() or similar calls, which means that we cannot reliably
|
||||
// shut down the terminal without resorting to obscene custom C code
|
||||
// and a dedicated poller thread.
|
||||
//
|
||||
// So instead, we do a best effort, and simply try to do the close in the
|
||||
// background. Probably this will cause a leak of two goroutines and
|
||||
// maybe also the file descriptor, meaning that applications on Darwin
|
||||
// can't reinitialize the screen, but that's probably a very rare behavior,
|
||||
// and accepting that is the best of some very poor alternative options.
|
||||
//
|
||||
// Maybe someday Apple will fix there tty driver, but its been broken for
|
||||
// a long time (probably forever) so holding one's breath is contraindicated.
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type termiosPrivate syscall.Termios
|
||||
|
||||
func (t *tScreen) termioInit() error {
|
||||
var e error
|
||||
var newtios termiosPrivate
|
||||
var fd uintptr
|
||||
var tios uintptr
|
||||
var ioc uintptr
|
||||
t.tiosp = &termiosPrivate{}
|
||||
|
||||
if t.in, e = os.OpenFile("/dev/tty", os.O_RDONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
if t.out, e = os.OpenFile("/dev/tty", os.O_WRONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
|
||||
tios = uintptr(unsafe.Pointer(t.tiosp))
|
||||
ioc = uintptr(syscall.TIOCGETA)
|
||||
fd = uintptr(t.out.(*os.File).Fd())
|
||||
if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 {
|
||||
e = e1
|
||||
goto failed
|
||||
}
|
||||
|
||||
// On this platform (FreeBSD and family), the baud rate is stored
|
||||
// directly as an integer in termios.c_ospeed. No bitmasking required.
|
||||
t.baud = int(t.tiosp.Ospeed)
|
||||
newtios = *t.tiosp
|
||||
newtios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK |
|
||||
syscall.ISTRIP | syscall.INLCR | syscall.IGNCR |
|
||||
syscall.ICRNL | syscall.IXON
|
||||
newtios.Oflag &^= syscall.OPOST
|
||||
newtios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON |
|
||||
syscall.ISIG | syscall.IEXTEN
|
||||
newtios.Cflag &^= syscall.CSIZE | syscall.PARENB
|
||||
newtios.Cflag |= syscall.CS8
|
||||
|
||||
tios = uintptr(unsafe.Pointer(&newtios))
|
||||
|
||||
ioc = uintptr(syscall.TIOCSETA)
|
||||
if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 {
|
||||
e = e1
|
||||
goto failed
|
||||
}
|
||||
|
||||
signal.Notify(t.sigwinch, syscall.SIGWINCH)
|
||||
|
||||
if w, h, e := t.getWinSize(); e == nil && w != 0 && h != 0 {
|
||||
t.cells.Resize(w, h)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
failed:
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
if t.out != nil {
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
func (t *tScreen) termioFini() {
|
||||
|
||||
signal.Stop(t.sigwinch)
|
||||
|
||||
<-t.indoneq
|
||||
|
||||
if t.out != nil {
|
||||
fd := uintptr(t.out.(*os.File).Fd())
|
||||
ioc := uintptr(syscall.TIOCSETAF)
|
||||
tios := uintptr(unsafe.Pointer(t.tiosp))
|
||||
syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0)
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
|
||||
// See above -- we background this call which might help, but
|
||||
// really the tty is probably open.
|
||||
|
||||
go func() {
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
func (t *tScreen) getWinSize() (int, int, error) {
|
||||
|
||||
fd := uintptr(t.out.(*os.File).Fd())
|
||||
dim := [4]uint16{}
|
||||
dimp := uintptr(unsafe.Pointer(&dim))
|
||||
ioc := uintptr(syscall.TIOCGWINSZ)
|
||||
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL,
|
||||
fd, ioc, dimp, 0, 0, 0); err != 0 {
|
||||
return -1, -1, err
|
||||
}
|
||||
return int(dim[1]), int(dim[0]), nil
|
||||
}
|
129
vendor/maunium.net/go/tcell/tscreen_linux.go
generated
vendored
Normal file
129
vendor/maunium.net/go/tcell/tscreen_linux.go
generated
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
// +build linux
|
||||
|
||||
// Copyright 2017 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type termiosPrivate syscall.Termios
|
||||
|
||||
func (t *tScreen) termioInit() error {
|
||||
var e error
|
||||
var newtios termiosPrivate
|
||||
var fd uintptr
|
||||
var tios uintptr
|
||||
var ioc uintptr
|
||||
t.tiosp = &termiosPrivate{}
|
||||
|
||||
if t.in, e = os.OpenFile("/dev/tty", os.O_RDONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
if t.out, e = os.OpenFile("/dev/tty", os.O_WRONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
|
||||
tios = uintptr(unsafe.Pointer(t.tiosp))
|
||||
ioc = uintptr(syscall.TCGETS)
|
||||
fd = uintptr(t.out.(*os.File).Fd())
|
||||
if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 {
|
||||
e = e1
|
||||
goto failed
|
||||
}
|
||||
|
||||
// On this platform, the baud rate is stored
|
||||
// directly as an integer in termios.c_ospeed.
|
||||
t.baud = int(t.tiosp.Ospeed)
|
||||
newtios = *t.tiosp
|
||||
newtios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK |
|
||||
syscall.ISTRIP | syscall.INLCR | syscall.IGNCR |
|
||||
syscall.ICRNL | syscall.IXON
|
||||
newtios.Oflag &^= syscall.OPOST
|
||||
newtios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON |
|
||||
syscall.ISIG | syscall.IEXTEN
|
||||
newtios.Cflag &^= syscall.CSIZE | syscall.PARENB
|
||||
newtios.Cflag |= syscall.CS8
|
||||
|
||||
// This is setup for blocking reads. In the past we attempted to
|
||||
// use non-blocking reads, but now a separate input loop and timer
|
||||
// copes with the problems we had on some systems (BSD/Darwin)
|
||||
// where close hung forever.
|
||||
newtios.Cc[syscall.VMIN] = 1
|
||||
newtios.Cc[syscall.VTIME] = 0
|
||||
|
||||
tios = uintptr(unsafe.Pointer(&newtios))
|
||||
|
||||
// Well this kind of sucks, because we don't have TCSETSF, but only
|
||||
// TCSETS. This can leave some output unflushed.
|
||||
ioc = uintptr(syscall.TCSETS)
|
||||
if _, _, e1 := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0); e1 != 0 {
|
||||
e = e1
|
||||
goto failed
|
||||
}
|
||||
|
||||
signal.Notify(t.sigwinch, syscall.SIGWINCH)
|
||||
|
||||
if w, h, e := t.getWinSize(); e == nil && w != 0 && h != 0 {
|
||||
t.cells.Resize(w, h)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
failed:
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
if t.out != nil {
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
func (t *tScreen) termioFini() {
|
||||
|
||||
signal.Stop(t.sigwinch)
|
||||
|
||||
<-t.indoneq
|
||||
|
||||
if t.out != nil {
|
||||
fd := uintptr(t.out.(*os.File).Fd())
|
||||
// XXX: We'd really rather do TCSETSF here!
|
||||
ioc := uintptr(syscall.TCSETS)
|
||||
tios := uintptr(unsafe.Pointer(t.tiosp))
|
||||
syscall.Syscall6(syscall.SYS_IOCTL, fd, ioc, tios, 0, 0, 0)
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (t *tScreen) getWinSize() (int, int, error) {
|
||||
|
||||
fd := uintptr(t.out.(*os.File).Fd())
|
||||
dim := [4]uint16{}
|
||||
dimp := uintptr(unsafe.Pointer(&dim))
|
||||
ioc := uintptr(syscall.TIOCGWINSZ)
|
||||
if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL,
|
||||
fd, ioc, dimp, 0, 0, 0); err != 0 {
|
||||
return -1, -1, err
|
||||
}
|
||||
return int(dim[1]), int(dim[0]), nil
|
||||
}
|
206
vendor/maunium.net/go/tcell/tscreen_posix.go
generated
vendored
Normal file
206
vendor/maunium.net/go/tcell/tscreen_posix.go
generated
vendored
Normal file
@ -0,0 +1,206 @@
|
||||
// +build solaris
|
||||
|
||||
// Copyright 2017 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// #include <termios.h>
|
||||
// #include <sys/ioctl.h>
|
||||
//
|
||||
// int getwinsize(int fd, int *cols, int *rows) {
|
||||
// #if defined TIOCGWINSZ
|
||||
// struct winsize w;
|
||||
// if (ioctl(fd, TIOCGWINSZ, &w) < 0) {
|
||||
// return (-1);
|
||||
// }
|
||||
// *cols = w.ws_col;
|
||||
// *rows = w.ws_row;
|
||||
// return (0);
|
||||
// #else
|
||||
// return (-1);
|
||||
// #endif
|
||||
// }
|
||||
//
|
||||
// int getbaud(struct termios *tios) {
|
||||
// switch (cfgetospeed(tios)) {
|
||||
// #ifdef B0
|
||||
// case B0: return (0);
|
||||
// #endif
|
||||
// #ifdef B50
|
||||
// case B50: return (50);
|
||||
// #endif
|
||||
// #ifdef B75
|
||||
// case B75: return (75);
|
||||
// #endif
|
||||
// #ifdef B110
|
||||
// case B110: return (110);
|
||||
// #endif
|
||||
// #ifdef B134
|
||||
// case B134: return (134);
|
||||
// #endif
|
||||
// #ifdef B150
|
||||
// case B150: return (150);
|
||||
// #endif
|
||||
// #ifdef B200
|
||||
// case B200: return (200);
|
||||
// #endif
|
||||
// #ifdef B300
|
||||
// case B300: return (300);
|
||||
// #endif
|
||||
// #ifdef B600
|
||||
// case B600: return (600);
|
||||
// #endif
|
||||
// #ifdef B1200
|
||||
// case B1200: return (1200);
|
||||
// #endif
|
||||
// #ifdef B1800
|
||||
// case B1800: return (1800);
|
||||
// #endif
|
||||
// #ifdef B2400
|
||||
// case B2400: return (2400);
|
||||
// #endif
|
||||
// #ifdef B4800
|
||||
// case B4800: return (4800);
|
||||
// #endif
|
||||
// #ifdef B9600
|
||||
// case B9600: return (9600);
|
||||
// #endif
|
||||
// #ifdef B19200
|
||||
// case B19200: return (19200);
|
||||
// #endif
|
||||
// #ifdef B38400
|
||||
// case B38400: return (38400);
|
||||
// #endif
|
||||
// #ifdef B57600
|
||||
// case B57600: return (57600);
|
||||
// #endif
|
||||
// #ifdef B76800
|
||||
// case B76800: return (76800);
|
||||
// #endif
|
||||
// #ifdef B115200
|
||||
// case B115200: return (115200);
|
||||
// #endif
|
||||
// #ifdef B153600
|
||||
// case B153600: return (153600);
|
||||
// #endif
|
||||
// #ifdef B230400
|
||||
// case B230400: return (230400);
|
||||
// #endif
|
||||
// #ifdef B307200
|
||||
// case B307200: return (307200);
|
||||
// #endif
|
||||
// #ifdef B460800
|
||||
// case B460800: return (460800);
|
||||
// #endif
|
||||
// #ifdef B921600
|
||||
// case B921600: return (921600);
|
||||
// #endif
|
||||
// }
|
||||
// return (0);
|
||||
// }
|
||||
import "C"
|
||||
|
||||
type termiosPrivate struct {
|
||||
tios C.struct_termios
|
||||
}
|
||||
|
||||
func (t *tScreen) termioInit() error {
|
||||
var e error
|
||||
var rv C.int
|
||||
var newtios C.struct_termios
|
||||
var fd C.int
|
||||
|
||||
if t.in, e = os.OpenFile("/dev/tty", os.O_RDONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
if t.out, e = os.OpenFile("/dev/tty", os.O_WRONLY, 0); e != nil {
|
||||
goto failed
|
||||
}
|
||||
|
||||
t.tiosp = &termiosPrivate{}
|
||||
|
||||
fd = C.int(t.out.(*os.File).Fd())
|
||||
if rv, e = C.tcgetattr(fd, &t.tiosp.tios); rv != 0 {
|
||||
goto failed
|
||||
}
|
||||
t.baud = int(C.getbaud(&t.tiosp.tios))
|
||||
newtios = t.tiosp.tios
|
||||
newtios.c_iflag &^= C.IGNBRK | C.BRKINT | C.PARMRK |
|
||||
C.ISTRIP | C.INLCR | C.IGNCR |
|
||||
C.ICRNL | C.IXON
|
||||
newtios.c_oflag &^= C.OPOST
|
||||
newtios.c_lflag &^= C.ECHO | C.ECHONL | C.ICANON |
|
||||
C.ISIG | C.IEXTEN
|
||||
newtios.c_cflag &^= C.CSIZE | C.PARENB
|
||||
newtios.c_cflag |= C.CS8
|
||||
|
||||
// This is setup for blocking reads. In the past we attempted to
|
||||
// use non-blocking reads, but now a separate input loop and timer
|
||||
// copes with the problems we had on some systems (BSD/Darwin)
|
||||
// where close hung forever.
|
||||
newtios.Cc[syscall.VMIN] = 1
|
||||
newtios.Cc[syscall.VTIME] = 0
|
||||
|
||||
if rv, e = C.tcsetattr(fd, C.TCSANOW|C.TCSAFLUSH, &newtios); rv != 0 {
|
||||
goto failed
|
||||
}
|
||||
|
||||
signal.Notify(t.sigwinch, syscall.SIGWINCH)
|
||||
|
||||
if w, h, e := t.getWinSize(); e == nil && w != 0 && h != 0 {
|
||||
t.cells.Resize(w, h)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
failed:
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
if t.out != nil {
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
func (t *tScreen) termioFini() {
|
||||
|
||||
signal.Stop(t.sigwinch)
|
||||
|
||||
<-t.indoneq
|
||||
|
||||
if t.out != nil {
|
||||
fd := C.int(t.out.(*os.File).Fd())
|
||||
C.tcsetattr(fd, C.TCSANOW|C.TCSAFLUSH, &t.tiosp.tios)
|
||||
t.out.(*os.File).Close()
|
||||
}
|
||||
if t.in != nil {
|
||||
t.in.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (t *tScreen) getWinSize() (int, int, error) {
|
||||
var cx, cy C.int
|
||||
if r, e := C.getwinsize(C.int(t.out.(*os.File).Fd()), &cx, &cy); r != 0 {
|
||||
return 0, 0, e
|
||||
}
|
||||
return int(cx), int(cy), nil
|
||||
}
|
32
vendor/maunium.net/go/tcell/tscreen_stub.go
generated
vendored
Normal file
32
vendor/maunium.net/go/tcell/tscreen_stub.go
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
// +build nacl plan9
|
||||
|
||||
// Copyright 2015 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
// You may obtain a copy of the license at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tcell
|
||||
|
||||
// This stub file is for systems that have no termios.
|
||||
|
||||
type termiosPrivate struct{}
|
||||
|
||||
func (t *tScreen) termioInit() error {
|
||||
return ErrNoScreen
|
||||
}
|
||||
|
||||
func (t *tScreen) termioFini() {
|
||||
}
|
||||
|
||||
func (t *tScreen) getWinSize() (int, int, error) {
|
||||
return 0, 0, ErrNoScreen
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user