view libgui/kb-layouts/linux.keytab @ 16457:10edb6f1ae98

improve encapsulation of file editor window object * file-editor-interface.h (file_editor_interface::connect_visibility_changed): New function. * file-editor.h, file-editor.cc (file_editor::handle_visibility, file_editor::focus, file_editor::connect_visibility_changed): New functions. (file_editor::construct): Connect main_window::new_file_signal to file_editor::new_file. * main-window.cc (main_window::editor_window): Rename from _file_editor. Change all uses. (create_default_editor): New static function. (main_window::main_window): Use it to initialize editor_window. (main_window::new_file_signal, main_window::open_file_signal): New signals. (main_window::new_file, main_window::open_file): Emit signals instead of calling file_editor functions directly. (main_window::focus_editor, main_window::handle_editor_visible): Delete. (main_window::connect_visibility_changed): Call editor_window->connect_visibility_changed. (main_window::construct): Don't create _file_editor. (main_window::construct_file_menu): Connect _open_action::triggered to editor_window::request_open_file instead of main_window::open_file. Connect _new_script_action::triggered to editor_window::request_new_file instead of main_window::new_file. (main_window::construct_new_menu): Connect editor_action::triggered to editor_window::focus instead of main_window::focus_editor.
author John W. Eaton <jwe@octave.org>
date Sun, 07 Apr 2013 05:45:23 -0400
parents 017f0b2e6933
children
line wrap: on
line source

# [linux.keytab] Konsole Keyboard Table (Linux console keys)
#
# --------------------------------------------------------------

# NOT TESTED, MAY NEED SOME CLEANUPS
keyboard "Linux console"

# --------------------------------------------------------------
#
# This configuration table allows to customize the
# meaning of the keys.
#
# The syntax is that each entry has the form : 
#
#   "key" Keyname { ("+"|"-") Modename } ":" (String|Operation)
#
# Keynames are those defined in <qnamespace.h> with the
# "Qt::Key_" removed. (We'd better insert the list here)
#
# Mode names are : 
#
# - Shift
# - Alt
# - Control
#
#   The VT100 emulation has two modes that can affect the
#   sequences emitted by certain keys. These modes are
#   under control of the client program.
#   
# - Newline     : effects Return and Enter key.
# - Application : effects Up and Down key.
#
# - Ansi        : effects Up and Down key (This is for VT52, really).
#
# Operations are
#
# - scrollUpLine
# - scrollUpPage
# - scrollDownLine
# - scrollDownPage
#
# - emitSelection
#
# If the key is not found here, the text of the
# key event as provided by QT is emitted, possibly
# preceeded by ESC if the Alt key is pressed.
#
# --------------------------------------------------------------

key Escape : "\E"
key Tab    : "\t"

# VT100 can add an extra \n after return.
# The NewLine mode is set by an escape sequence.

key Return-NewLine : "\r"  
key Return+NewLine : "\r\n"

# Some desperately try to save the ^H.

key Backspace : "\x7f"
key Delete    : "\E[3~"

# These codes are for the VT52 mode of VT100
# The Ansi mode (i.e. VT100 mode) is set by
# an escape sequence

key Up   -Shift-Ansi : "\EA"
key Down -Shift-Ansi : "\EB"
key Right-Shift-Ansi : "\EC"
key Left -Shift-Ansi : "\ED"

# VT100 emits a mode bit together
# with the arrow keys.The AppCuKeys
# mode is set by an escape sequence.

key Up   -Shift+Ansi+AppCuKeys : "\EOA"
key Down -Shift+Ansi+AppCuKeys : "\EOB"
key Right-Shift+Ansi+AppCuKeys : "\EOC"
key Left -Shift+Ansi+AppCuKeys : "\EOD"

key Up   -Shift+Ansi-AppCuKeys : "\E[A"
key Down -Shift+Ansi-AppCuKeys : "\E[B"
key Right-Shift+Ansi-AppCuKeys : "\E[C"
key Left -Shift+Ansi-AppCuKeys : "\E[D"

# linux functions keys F1-F5 differ from xterm

key F1 : "\E[[A" 
key F2 : "\E[[B" 
key F3 : "\E[[C" 
key F4 : "\E[[D" 
key F5 : "\E[[E" 

key F6     : "\E[17~" 
key F7     : "\E[18~" 
key F8     : "\E[19~" 
key F9     : "\E[20~" 
key F10    : "\E[21~" 
key F11    : "\E[23~" 
key F12    : "\E[24~" 

key Home   : "\E[1~"  
key End    : "\E[4~"  

key Prior -Shift : "\E[5~"  
key Next  -Shift : "\E[6~"  
key Insert-Shift : "\E[2~"  

# Keypad-Enter. See comment on Return above.

key Enter+NewLine : "\r\n"
key Enter-NewLine : "\r"  

key Space +Control : "\x00"

# some of keys are used by konsole.

key Up    +Shift   : scrollLineUp
key Prior +Shift   : scrollPageUp
key Down  +Shift   : scrollLineDown
key Next  +Shift   : scrollPageDown

key ScrollLock     : scrollLock

#----------------------------------------------------------

# keypad characters as offered by Qt
# cannot be recognized as such.

#----------------------------------------------------------

# Following other strings as emitted by konsole.