Linked Questions

19
votes
3answers
17k views

How does keyboard mapping work in Linux? [duplicate]

I have always had trouble with understanding the way keyboard mapping and related things are put together in Linux. When things break, it makes my blood boil if I have to sift through endless ...
2
votes
2answers
660 views

How does bash print to the screen if not with a framebuffer? [duplicate]

I noticed that a framebuffer doesn't always exist on some systems. In these cases, how does bash print to the screen (assuming it ever uses fb devices at all)? Since there's no framebuffer device, ...
1
vote
1answer
260 views

How does the X server emit a character when the keyboard is pressed? [duplicate]

This is actually a coding question. I know that the X server checks the active keyboard layout to figure out which character (supporting unicode) to emit. But I don't actually know how this is done, ...
0
votes
1answer
137 views

Which module in a Linux distribution is responsible for keyboard shortcuts? [duplicate]

I have a specific problem with keyboard shortcuts and haven't gotten a solution for it so far, so now i need to know which module within a Linux distribution is responsible for handling keyboard ...
0
votes
1answer
170 views

How reading command line happens in Ubuntu [duplicate]

As I was doing a project, I came to know about how command line can be read using ncurses and GNU's readline library. However I could not find either in Ubuntu (16.04). I am curious to know how Ubuntu ...
0
votes
1answer
96 views

Is it the terminal or the shell that is responsible for actions of keystrokes? [duplicate]

I don't know exactly if the terminal is the handler of keystrokes like CTRL + C or CTRL + D and many others or the shell. When I press a keystoke I think about it this way, as the picture describes: ...
1
vote
0answers
140 views

How does a terminal emulator work [duplicate]

I never really understood how a terminal emulator (be it e.g. XTerm or the Linux virtual console) works. What transformations happen to the input (key up/down events) to produce the output (usually ...
0
votes
1answer
56 views

Keybord-key and the resulting character. Who is responsible (in the OS) [duplicate]

Pressing a key on the keybord results in different types of characters in different OS's. e.g. pressing the up arrow in windows will result in a nother sequence of characters then pressing the same ...
0
votes
0answers
43 views

How does terminal in Linux actually work? [duplicate]

I'm using Linux console for years, but currently started thinking of how it actually works. Typing a command as a string and pressing Enter returns its output in the same terminal window. Opening a ...
0
votes
0answers
25 views

How does non-shell application read input from keyboard [duplicate]

Shell reads the input from keyboard and mouse using the tty attached to it. The same applies for all the programs that I run via command line where the stdin, stdout and stderr are set to console ...
1
vote
0answers
18 views

How and when is keyboard data encoded from keyboard to application? [duplicate]

How and when is keyboard data encoded? I just want to know in basic terms the process from the keyboard to the application; when is the data from the keyboard encoded? Is it encoded by the keyboard ...
1448
votes
10answers
427k views

What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?

I think these terms almost refer to the same thing, when used loosely: terminal shell tty console What exactly does each of these terms refer to?
78
votes
4answers
20k views

What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

I am trying to figure out how a tty works1 (the work-flow and responsibilities of each elements). I have read several interesting articles about it, but there are still some blurry areas. This is ...
26
votes
10answers
46k views

How to stop cursor from blinking

How do I make the cursor stop blinking when in a TTY? (or anywhere else). BONUS Points for one universal setting that stops the cursor blinking almost everywhere.
56
votes
2answers
17k views

Documentation on LESS_TERMCAP_* variables?

I see these pretty colors in manpages viewed with less when setting a bunch of these variables. What do they mean, where is the documentation? Is this interpreted by less or termcap? screenshot
24
votes
6answers
32k views

key bindings table?

Do we have a key bindings table that translates all the various ways of referring to a key press? I'm using zsh, but I presume that if there was such a table it would work for any shell. The reason I ...
28
votes
2answers
33k views

How do mouse events work in linux?

This is mostly out of curiosity, I'm trying to understand how event handling works on a low level, so please don't reference me to a software that'll do it for me. If for example I want to write a ...
23
votes
3answers
2k views

What does the ^ character mean in sequences like ^X^I?

I was reading this message from the zsh mailing list about key bindings and I'd like to know which key I need to press: ^X^I (I think Ctrl-X Ctrl-I, the capital X and I) ^[^@ (I think Ctrl-Esc-@ ??) ^...
10
votes
5answers
13k views

Why is Terminal automatically executing my command after pasting text?

This happens whether I use ctrl+shift+v or paste from the right-click menu. What could be done to prevent this behavior?
15
votes
2answers
24k views

/dev/input - What exactly is this?

I was curious about how hardware interacted with the OS and came across this post: How do keyboard input and text output work? It seems like a lot of the magic happens in the /dev/input directory. I ...
13
votes
1answer
4k views

Relationship of keyboard layout and xmodmap

I'm using Xubuntu. Before login I can choose a keyboard layout. I'm using xmodmap for remapping some keys. I'm interested in two things: How the state of keyboard mapping changes (a) when I turn the ...
18
votes
1answer
28k views

How to get all my keys to send keycodes

I'm using Gentoo with XFCE. I have a logitech K350 keyboard, all but a few of the keys work as expected but there is one specific key that I want to use but when I run showkey no key codes are being ...
10
votes
2answers
3k views

Why can't Emacs running in a terminal distinguish Ctrl+; from ";"?

This question arose from my previous question on emacs beta. In short I want to bind C-; to an Emacs functions in a terminal, but it seems that something captures this key before it reaches Emacs: ...
9
votes
3answers
4k views

Detecting shift + keyup/down in the terminal

How do I do this? I want a terminal menu where shift+up or shift+down selects multiple lines. ncurses seems to have problems. I don't necessarily need an advanced terminal library. I just want to ...
6
votes
2answers
9k views

Set Ctrl+Shift as prefix in tmux

I would want to have Ctrl+Shift as prefix in tmux (because I'm trying to switch from terminator, and the majority of my shortcuts used Ctrl+Shift). I tried this in my .tmux.conf : unbind-key C-b set-...
8
votes
1answer
9k views

How does the Linux kernel handle keyboards inputs/outputs?

I don't understand virtual terminal devices (eg. /dev/tty1), but I know I can "switch" to tty1 if I press ctrl + alt + f1. I've got a custom keyboard layout, which is in /usr/share/X11/xkb/symbols/us ...
5
votes
3answers
2k views

How is implemented the GUI of Vim if is a program that runs on terminal?

I can't figure out how is implemented programs such as Vim (or top for example) that are executed inside the terminal and has a GUI. It is assumed that the terminal can only display characters, and ...
4
votes
2answers
3k views

What uses the TERM variable?

According to this document: The environment variable TERM contains a identifier for the text window’s capabilities. You can get a detailed list of these cababilities by using the ‘infocmp’ ...
7
votes
2answers
3k views

Can I set my local machine's terminal colors to use those of the machine I ssh into?

I have a color scheme that I like for when I'm in a terminal, but I ssh into the machine I work on from multiple sources (locally, PuTTY, my netbook, etc.) and I want to maintain the same color scheme ...
4
votes
2answers
2k views

Why does "shift-tab" result in "Escape" in the terminal?

I just noticed this by accident. I use the vi readline mode (run set -o vi in bash) so it is particularly noticeable; in emacs readline mode I don't think Esc does anything, but in vi mode it exits ...

15 30 50 per page