81 Commits (96c230e476a4fb446a8fa8d651c88fda32cd5427)

Author SHA1 Message Date
Roberto E. Vargas Caballero 96c230e476 Add key definition for printer sequences
These new combinations generate the same behaviour (basically) of
vt102. It is a good way of communicating st with other programs.

[0] http://www.vt100.net/docs/vt102-ug/chapter2.html
11 years ago
Roberto E. Vargas Caballero 21d905c076 Make Shift+Home equal to CLS in ascii mode 11 years ago
Roberto E. Vargas Caballero 9523233e25 Make CONTROL + DELETE delete a line
If CONTROL + INSERT inserts a line then it seems natural CONTROL + DELETE
removes a line.
11 years ago
Roberto E. Vargas Caballero d2173cd716 Fix SHIFT+DEL definition
The AppMode and AsciiMode were inverted in the definition of this
combination.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
11 years ago
Mark Edgar ef1dc9fc4b Replace alignment tabs with spaces. 11 years ago
Mark Edgar 6162d63151 Fix comments in config.def.h to match field names. 11 years ago
Mark Edgar fb8e3f67f7 Fix definition of F28 key.
Shitf modifier adds 12 to the function number of the function keys,
while Control adds 24, so Control + F4 generates F28
11 years ago
Mark Edgar 297c886b72 Ignore numlock (Mod2Mask) for button events too.
Conflicts:
	config.def.h
	st.c
11 years ago
Christoph Lohmann cc2ea3147a Default volume of the bell is 0. 11 years ago
Roberto E. Vargas Caballero bef599bb27 Add audible bell
\a is the character for bell, and st is only marking the window as urgent
if it is not active. This patch adds an audible bell which can be disable
with bellvolume variable.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
11 years ago
Mark Edgar 4245ba0d12 Correctly initialize altscreen when defaultbg is not 0.
The alternate screen is not properly initialized when st starts. To see
this, set defaultbg in config.h to anything other than 0 (for example, swap
defaultfg and defaultbg), and run:

./st -e sh -c 'tput smcup; read'

You should see that the top-left 80x24 rectangle is black (or whatever
colorname[0] is), while the rest of the screen (if any) has the desired
colorname[defaultbg] color.

The attached patch fixes this by initializing term.c.attr in tnew() before
calling tresize(). It also removes the unnecessary xcalloc() calls, which
misled me on this bug hunt since it is really tclearregion() which
initializes term.lines and term.alt in tresize().
11 years ago
Eric Pruitt 7e3cff33ff Use character size scaling factors
The bounding boxes for characters can be scaled using "cwscale" and "chscale"
to scale the width and height respectively.
11 years ago
Markus Teich 40e4d76d22 fix: whitespace 12 years ago
Markus Teich 7af030c999 fix PageUp Modifier Mask in config.def.h
Signed-off-by: Christoph Lohmann <20h@r-36.net>
12 years ago
Christoph Lohmann 2cf4f366d6 Bumping up the xfps so mouse motion won't reap the CPU. 12 years ago
Christoph Lohmann 8e968739c3 Allow more complex delimiters for word selections.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
12 years ago
Christoph Lohmann e1458ef467 Explaining blinking for the dummies. 12 years ago
Christoph Lohmann a53017c8b4 Add a possibility to modify the string sent by mouse buttons.
Thanks Alexander Rezinsky <alexrez@gmail.com> for the suggestion!
12 years ago
Christoph Lohmann 1e09726518 Enable blinking in st. 12 years ago
Christoph Lohmann 1e7816c202 Drawing a more visible rectangle as cursor on unfocus.
To have a more visible cursor on unfocused windows this patch makes st draw a
rectangle around the terminal cell.

Thanks Mark Hills <mark@xwax.org> for the suggestion!
12 years ago
Christoph Lohmann 580c8bbd46 Add an option to disable alternative screens. 12 years ago
Christoph Lohmann 7e7760c2ed Add the possibility to have default highlight colors.
Thanks to stargrave@stargrave.org for the suggestion!
12 years ago
Christoph Lohmann adde5c6d9d Adding PgUp + Ctrl.
Thanks stargrave@stargrave.org!
12 years ago
Christoph Lohmann f876810626 Adding PgUp and PgDown + Ctrl to config.def.h
Thanks stargrave@stargrave.org!
12 years ago
Christoph Lohmann be7c6d7fb0 Add insert for the primary clipboard to MOD + Shift + Ins.
Thanks Mantas Mikulėnas <grawity@gmail.com> for the patch!
12 years ago
Christoph Lohmann 3865e9eaaf Implement rectangular mouse selection.
Thanks Alexander Sedov <alex0player@gmail.com>!
12 years ago
Christoph Lohmann f4a6c20f46 Adding a way to ignore bits in the state. 12 years ago
Christoph Lohmann a92a678e25 The refresh rate for the action needs to be high too. 12 years ago
Christoph Lohmann de7e0e9c8d Changing the fps to something reasonable high. 12 years ago
Christoph Lohmann 086cd61511 Doing it like the new run() was proposed. 12 years ago
Christoph Lohmann 95033753be Adding a more efficient drawing code.
Thanks Mihail Zenkov <mihail.zenkov@gmail.com> for giving the hint!
12 years ago
Christoph Lohmann 2696f81875 Be careful about mar77i's patches. 12 years ago
Christoph Lohmann fe3fb82d29 Applying the patch of mar771 right. 12 years ago
Christoph Lohmann fdce8bba1a Applying the change of the Del key assingment. Thanks Martti Kühne! 12 years ago
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(-)
12 years ago
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(-)
12 years ago
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(-)
12 years ago
Christoph Lohmann 61b20f4bc1 Add a notice in the config.def.h file how to obtain the syntax for
xft/fontcache.
12 years ago
Roberto E. Vargas Caballero 172f65436c Add key for toogling numlock handling
Keypad will generate keycodes when keypad application mode is enabled. It
can cause problems with some programs like vi, which operates in such
mode.

This patch change by default don't generate the keycodes never, but this
behaviour can be changed using the combination Alt + NumLock.
---
 config.def.h |   34 ++++++++++++++++++----------------
 st.c         |   17 +++++++++++++++--
 2 files changed, 33 insertions(+), 18 deletions(-)
12 years ago
Christoph Lohmann cf04354e06 Restoring the Alt + Backspace functionality. Thanks Brandon Invergo! 12 years ago
Roberto E. Vargas Caballero 55087ec2c7 Add application cursor sequences for Home
The commit 'Fixing some key issues with mc' fix the problem where mc didn't
recognize home key because the generated code and the terminfo entry were
different (terminfo khome = \E[1~ but generates \033[H).

Home key in ansi mode should generate the sequence CUP (\033[H) to 0,0 (home
position), but it is also interesting generate a application code which
identifies the key. Real vt520 only generates the ansi sequence CUP, linux
console generates only the application code \033[1~, xterm generates CUP in
ansi mode and \033OH in cursor application mode, rxvt only generates the
application code \033[7~.

This patch sets CUP in ansi mode and \033[1~ in cursor application mode, so
it can be used in both modes and the application mode value is similar to
near values (insert = \033[2~, Prior = \033[5~, Next = \033[6~, End =
\033[4~, Supr = \033[3).
---
 config.def.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
12 years ago
Christoph Lohmann 1cbe56026b Fixing some key issues with mc. Thanks nsz! 12 years ago
Christoph Lohmann 2b6521f5d2 Optimizing the key lookup to the X11 function key. It is still possible to
remap other keys.
12 years ago
Christoph Lohmann 927d8fb459 Making all function keys accessible. 12 years ago
Christoph Lohmann a29ab30f25 Adding support for XK_F35. 12 years ago
Christoph Lohmann d5640c7729 Fixing the return and keypad enter sent characters. Terminals produce \r. And
some minor style changes.
12 years ago
Christoph Lohmann e87d21bb3d The crlf mode was reversed. 12 years ago
Christoph Lohmann e7bb14e03e Fixing Return in non-crlf mode. 12 years ago
Roberto E. Vargas Caballero 4389f2eb1b Use XK_ANY_MOD instead of XK_NO_MOD in key definition
Usually terminal emulators don't generate any sequence for a combination
they don't have registered, for example Shift + Next, but st behavior
previous to the keyboard patch generates the sequence without the modifier,
in this example Next. This patch uses the XK_ANY_MOD in order to get this
same behaviour.
---
 config.def.h |  114 ++++++++++++++++++++++++++++++----------------------------
 1 file changed, 59 insertions(+), 55 deletions(-)
12 years ago
Roberto E. Vargas Caballero 16ccf344de Fix tab key
When Shift + Tab is pressed X server send the event XK_ISO_Left_Tab with
ShiftMask, so this is the entry we need in config.def.h

This patch also revert the previous patch for this issue because it breaks
the keyboard.
---
 config.def.h |    2 +-
 st.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
12 years ago