The vast majority of the code here lives under js/.
- audio/: Audio files (e.g. the bell alert).
- bin/: Tools for building/testing hterm.
- dist/: Builds of the hterm for integration with other projects.
- docs/: Documentation files.
- etc/: Scripts/snippets for hterm users to leverage terminal features.
- examples/: Example projects using hterm.
- html/:
- hterm_test.html: Run all available unittests.
- images/: Image files (e.g. notification icons).
- js/: The majority of relevant code for hterm.
- See the section below.
- test_data/: Various test data and helper scripts.
-
Core logic
- hterm.js: Global inititalization, utility functions & classes.
- hterm_screen.js: The currently visible screen.
- hterm_scrollport.js: A viewport into the buffer that builds the screen.
- hterm_terminal.js: The central
Terminal
object. - hterm_terminal_io.js: The IO object for writing data into the Terminal from the user and the connected process.
- hterm_vt.js: Core processing of escape/control sequences.
-
Keyboard related code
- hterm_keyboard.js: Central object for capturing and processing user input.
- hterm_keyboard_bindings.js: Helper for binding keypresses (via keypatterns) to actions.
- hterm_keyboard_keymap.js: Default keyboard map (e.g. what happens when you press X, Ctrl+X, Alt+X, etc...).
- hterm_keyboard_keypattern.js: Helper for matching keyboard bindings.
- hterm_parser.js: Simple parser for handling keyboard bindings.
- hterm_parser_identifiers.js: Constants for the parser code (such as keyboard key names and actions).
-
Supplementary modules
- hterm_accessibility_reader.js: Code related to rendering terminal output for a screen reader.
- hterm_contextmenu.js: The context menu shown when right clicking.
- hterm_options.js: Internal runtime settings for the
Terminal
object. - hterm_preference_manager.js: Manager for user preferences.
- hterm_pubsub.js: Helper for managing custom events.
- hterm_text_attributes.js: Helpers for sections of text with different attributes (e.g. colors, bold, italics, etc...).
- hterm_vt_character_map.js: Code related to character map translations (SCS). Probably safe to ignore as it's unused by default.
-
Testing related code
- hterm_test.js: Main unittest runner logic. Locates & runs all tests.
hterm_mock_*.js
: Various object mocks to simplify unittests.*_tests.js
: Each module has a corresponding set of unittests. The filename follows the convention of adding_tests
. e.g.hterm_tests.js
contains the tests forhterm.js
.