Commit graph

48 commits

Author SHA1 Message Date
Roberto E. Vargas Caballero
c46d929fe1 Fix Backspace and Delete characters
Backspace key must generate the backspace character (\010) and
Delete key must generate the delete character (\0177). In
some systems the kernel configuration for erasing previous character
is \0177, so some programs (for example cat, ed, mail, ...), can not
understand the correct meaning of backspace. In this cases it is only
needed this command:

	stty erase 
2014-04-11 15:08:37 +02:00
Roberto E. Vargas Caballero
85f8a414be Add terminfo entries for printer
These capabilities inform to programs how print in local printer
of the terminal.
2014-03-06 07:55:21 +01:00
Eric Pruitt
2738592de6 Fix rmul definition
rmul means "exit underline mode", so a full reset of all
the attributes is not the correct way of exiting from
underline mode, because it is going to modify also another
attributes not related.
2013-12-10 17:21:12 +01:00
Roberto E. Vargas Caballero
4579693818 Add terminfo definitions for terminals with meta key
Some programs don't check the value of km and use smm and rmm
capabilites, and they cause the terminal change to meta enabled
mode even in cases where is not desirable.

Allmost all people is using the terminal waiting that meta sends
escape, so rmm and smm are not needed. If someone needs meta
sets 8 bit he can use the correct terminfo definition in TERM.
2013-08-12 16:53:09 +02:00
Christoph Lohmann
1e09726518 Enable blinking in st. 2013-04-26 18:41:54 +02:00
Christoph Lohmann
7ea6863208 Yes, rs2 != is2. 2013-04-23 15:38:48 +02:00
Christoph Lohmann
8037dac847 There is no 8bit by default and reset 8bit too. 2013-04-23 15:33:21 +02:00
Christoph Lohmann
2bd6afd1c9 Implementing 8 bit mode for meta. 2013-04-23 15:22:14 +02:00
Christoph Lohmann
b78c5085f7 Implementing Back Color Erase (BCE). 2013-01-20 14:54:35 +01:00
Christoph Lohmann
f741df9cda Standout is now reverse. This makes bsd-games work in st. 2013-01-08 19:46:28 +01:00
Roberto E. Vargas Caballero
d5994b43ca Add support for End key
- Shift + End : Delete until end of line.
    - Control + End : Delete until end of screen.

When  the End  key is  pressed  without any  modifier is  not generated  the
correct sequence for it  (going to the end of the  screen), because the size
of the  terminal is not known,  so it is  not possible write a  sequence for
this purpouse.
---
 config.def.h |   10 ++++++++--
 st.info      |    2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
2012-11-25 22:13:29 +01:00
Roberto E. Vargas Caballero
7c34ff1703 Add support for Supr key
Del : Delete character under cursor.
    Shift + Del : Delete the line under cursor.
    Ctrl + Del: Delete the full screen.
---
 config.def.h |   16 ++++++++++++----
 st.info      |    2 ++
 2 files changed, 14 insertions(+), 4 deletions(-)
2012-11-25 22:13:24 +01:00
Roberto E. Vargas Caballero
3c99be68e8 Add support for insert key
Insert key stands for a key which allows enter or leaves insert mode, so let
it generates the correct sequence to change between these modes:

   - Insert: Enter in insert mode.
   - Shift + Insert: Leave insert mode (replace mode).
   - Control + Insert: Insert a blank line.

Like Shift + Insert also paste text, if a user want this feature be full
functional he has to modify such shortcut.
---
 config.def.h |   16 ++++++++++++----
 st.info      |    3 +++
 2 files changed, 15 insertions(+), 4 deletions(-)
2012-11-25 22:13:19 +01:00
Roberto E. Vargas Caballero
e7904128c6 Fix value of ka1 terminfo capability
ka1 stands for upper left of keypad, so the correct value is the one
generated by Home in application keypad mode.
---
 st.info |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-11-25 22:13:13 +01:00
Christoph Lohmann
801ea034b6 Import the patch of Eckehard Berns to add insert mode. Thanks! 2012-11-15 16:21:23 +01:00
Roberto E. Vargas Caballero
620e3bb39e Add missed key definitions
This patch adds the keys for the keypad (in both modes, application mode or
ansi mode) and function keys. It uses the same convention than xterm and
instead of using the XK_Fxx values it generates them using F1-F12 and
modifiers. For example:

   F1 -> ^[OP
   F1 + Shift = F13 -> ^[[1;2P
   F1 + Control = F25 -> ^[[1;5P
   F1 + Mod2 = F37 -> ^[[1;6P
   F1 + Mod1 = F49 -> ^[[1;3P
   F1 + Mod3 = F61 -> ^[[1;4P

It is also important notice than the terminfo capability kIC (shifted insert
key) only can be generated using the keypad keyboard, because the shorcut
for selection paste is using the same combination.

After this path the number of elements in the Key array becomes high, and
maybe a sequencial search is not enough efficient now.
---
 TODO         |    6 +---
 config.def.h |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 st.info      |   70 ++++++++++++++++++++++++++++++++++++++--
 3 files changed, 169 insertions(+), 9 deletions(-)
2012-11-13 20:05:02 +01:00
Roberto E. Vargas Caballero
44597b359e Add control and meta combinations for arrow keys
Since there isn't any terminfo capability for control and meta modifiers for
arrows keys it is necessary use the same that almost terminal emulators use,
because there are a lot of programs which have these codes hardcoded.

This cause also that shift combinations are also changed, but in this case
this is not a problem since there are terminfo capabilities for them. After
this patch shift-up and shift-down continue not working in emacs with
TERM=st, but they work with TERM=xterm, so it is possible some other changes
are necessary in the terminfo entry.
---
 config.def.h |   16 ++++++++++++----
 st.info      |    8 ++++----
 2 files changed, 16 insertions(+), 8 deletions(-)
2012-11-13 20:04:54 +01:00
Roberto E. Vargas Caballero
3b16695f4e Fix arrow keys terminfo capabilities
Usually the arrow keys generate the ANSI sequence which terminal will
understand like a movement, so it is not necessary any dealing for them, the
program can not know if the sequence is generate for a echo key or directly
from the program. If you need really know if the key was pressed then you
need activate the keypad mode where the keys will generate a special code
for each keypad key.

The terminfo capabilities kcub1, kcud1, kcuf1 and kcuu1 are used for this
keypad code, not for the sequence generate in the ansi mode.
---
 st.info |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
2012-11-13 20:04:50 +01:00
Roberto E. Vargas Caballero
69ee3ba3a7 Fix keypad mode and cursor mode
Keypad mode is used for detecting when keys in the auxiliary keypad are
pressed, while cursor mode is used for detecting when a cursor is pressed,
but they are different modes.

St was mixing both modes and DECPAM and DECPNM modified the cursor mode, and
this was incorrect.
---
 st.c    |    5 +++--
 st.info |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
2012-11-13 20:04:34 +01:00
Christoph Lohmann
980c5956ed Enabling enacs and adding compatibility to xterm and urxvt for alternative
charsets.
2012-09-25 21:17:43 +02:00
Christoph Lohmann
462a966ee2 Implement italic font support. 2012-09-05 21:48:26 +02:00
Christoph Lohmann
a61b9ea82e Enable keypad set and unset commands. 2012-09-05 01:25:37 +02:00
Christoph Lohmann
da4a77edbe Disable BCE again. 2012-09-05 00:58:17 +02:00
Christoph Lohmann
052a617828 Updating the TODO and enabling BCE. 2012-09-04 22:05:24 +02:00
Christoph Lohmann
466decd535 Fixing a type in in2 in the st.info. 2012-09-03 21:54:40 +02:00
Christoph Lohmann
cfefa054e8 Patch from Roberto Vargas. »Add initialization strings in terminfo«
Taken from the description:

When tput init is executed the list of task performed are (taken from
terminfo(5)):

              run the program
                     iprog

              output is1 is2

              set the margins using
                     mgc, smgl and smgr

              set tabs using
                     tbc and hts

              print the file
                     if

              and finally
                     output is3.

When reset is executed, a more stronger initialization process is performed,
so the terminal can return from an unknown state. rs1, rs2 and rs3 are used
in this case instead of
using is1, is2 and is3.

This patch makes is2 = rs2, resets insert mode and set normal keypad
mode. For rs1 it performs a full initilization using ^[c.
2012-09-03 21:50:22 +02:00
Christoph Lohmann
b11d85c9be Add standout mode. 2012-09-02 19:53:50 +02:00
Roberto E. Vargas Caballero
4cdcc39539 Add vpa terminfo capability
---
 st.info |    2 ++
 1 file changed, 2 insertions(+)
2012-09-02 19:08:52 +02:00
Christoph Lohmann
ff040e9894 Adding setb and setf and a comment about terminfo installation. 2012-08-29 21:13:47 +02:00
Roberto E. Vargas Caballero
c084c06b40 Add TBC sequence
This sequence clears tab stops in the terminal. If the argument is not present
or is zero, then removes the tab stop of the current horizontal position. If
the argument is 3 then removes all the tab stops of the terminal. It was
necessary modify the terminfo entry tbc, because it has \E[2g instead of the
correct \E[3g.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c    |   12 ++++++++++++
 st.info |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
2012-08-29 19:59:47 +02:00
Aurélien Aptel
f78b793d91 change "op" cap in terminfo entry to xterm/rxvt value. 2011-08-14 17:15:19 +02:00
Aurélien Aptel
189a81caa1 add altscreen escseq alias & caps to terminfo entry. (thx Bert Münnich) 2011-06-08 20:22:38 +02:00
Aurélien Aptel
d59f92d6f1 reverse video mode. (thx Bert Münnich) 2011-06-08 12:40:35 +02:00
Aurélien Aptel
b2db58c2a0 add status bar (window title) to terminfo. (thx Rafa Gallego) 2011-06-01 19:57:48 +02:00
Aurélien Aptel
0107293a44 add mouse report escape to terminfo entry. 2011-05-10 22:54:30 +02:00
Aurélien Aptel
9d5ea14b9d selection clicks, shift+arrow keys, fast(er) redraw, key mask in config.h (thx Magnus Leuthner) 2011-04-22 00:18:53 +02:00
Aurélien Aptel
4d649c2403 fix insert key, terminfo and changed TERM back to st. (thx Ondrej Martinek) 2011-01-23 12:30:01 +01:00
Aurélien Aptel
e8b18dd97b update terminfo entry. 2010-12-08 18:41:55 +01:00
Aurélien Aptel
fd1149866f add new line glitch to terminfo entry. 2010-12-08 18:09:39 +01:00
Aurélien Aptel
273d4ba938 cleaning st.info. added comment in st.c for DECSCNM. 2010-09-03 00:15:43 +02:00
Aurélien Aptel
c43526153f cleaning st.info. fixed cvvis. 2010-09-03 00:00:41 +02:00
Aurélien Aptel
7d325a3797 fixed start/end sequence of gfx. 2010-09-02 20:24:33 +02:00
Aurélien Aptel
42344b7154 started to go through st.info and fix things. 2010-09-01 22:54:07 +02:00
Aurélien Aptel
a79bc96c94 capabilities sorted by capname in st.info. copy acsc from xterm. 2010-09-01 19:47:46 +02:00
Aurélien Aptel
a7922bd1d9 added F1-12 key, fixed DCH and ICH. 2010-08-22 19:46:46 +02:00
Aurélien Aptel
ce3f4fc647 fixed backspace problem, updated terminfo entry and moved TNAME in config.h. 2010-08-19 12:46:54 +02:00
Anselm R Garbe
10e49a0505 applied Devin J Pohly's st color info patches, thanks Devin! 2010-07-24 12:09:14 +01:00
Anselm R Garbe
d58dd3b8bc backport of local changes 2009-05-10 13:17:09 +01:00