Skip to main content
added 1308 characters in body
Source Link

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

Setup: Debian 12, Bash, KDE/Gnome

The core feature I'm searching for:

I just want to mark text/ part of a text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Results I discovered:

The kernel console (TTY) does not support extended modifier sequences like Shift+arrow keys, which means it is not possible to select text using Shift+arrow keys in the Micro editor when running in the TTY.

According to the official man page console_codes(4), the Linux console implements only a subset of the VT102 and ECMA-48/ISO 6429/ANSI X3.64 terminal controls.

In particular, it lacks support for extended input sequences that are handled by modern terminal emulators like xterm. This means the console does not send escape sequences for combined keys such as Shift+arrow keys.

The loadkeys keymaps use tricks to assign different sequences to function keys (F1–F12) combined with modifiers like Alt or Ctrl.

But that probably works because the kernel has explicit support for it but it looks like not for Shift+Arrow.

From @Gilles 'SO- stop being evil' answer:

Terminals don't send key up events. (Your use case doesn't require them, though, according to your description.)

Unless you can afford to require a specific terminal emulator (e.g. recent-ish xterm), don't rely on the user being able to type Shift+Up. Support an alternate method, such as a “start multiple selection” key followed by plain Up/Down

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

Setup: Debian 12, Bash, KDE/Gnome

The core feature I'm searching for:

I just want to mark text/ part of a text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Results I discovered:

The kernel console (TTY) does not support extended modifier sequences like Shift+arrow keys, which means it is not possible to select text using Shift+arrow keys in the Micro editor when running in the TTY.

According to the official man page console_codes(4), the Linux console implements only a subset of the VT102 and ECMA-48/ISO 6429/ANSI X3.64 terminal controls.

In particular, it lacks support for extended input sequences that are handled by modern terminal emulators like xterm. This means the console does not send escape sequences for combined keys such as Shift+arrow keys.

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

Setup: Debian 12, Bash, KDE/Gnome

The core feature I'm searching for:

I just want to mark text/ part of a text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Results I discovered:

The kernel console (TTY) does not support extended modifier sequences like Shift+arrow keys, which means it is not possible to select text using Shift+arrow keys in the Micro editor when running in the TTY.

According to the official man page console_codes(4), the Linux console implements only a subset of the VT102 and ECMA-48/ISO 6429/ANSI X3.64 terminal controls.

In particular, it lacks support for extended input sequences that are handled by modern terminal emulators like xterm. This means the console does not send escape sequences for combined keys such as Shift+arrow keys.

The loadkeys keymaps use tricks to assign different sequences to function keys (F1–F12) combined with modifiers like Alt or Ctrl.

But that probably works because the kernel has explicit support for it but it looks like not for Shift+Arrow.

From @Gilles 'SO- stop being evil' answer:

Terminals don't send key up events. (Your use case doesn't require them, though, according to your description.)

Unless you can afford to require a specific terminal emulator (e.g. recent-ish xterm), don't rely on the user being able to type Shift+Up. Support an alternate method, such as a “start multiple selection” key followed by plain Up/Down

added 1308 characters in body
Source Link

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

For exampleSetup: Debian 12, Bash, KDE/Gnome

The core feature I'm searching for:

I just want to mark text/ part of a text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Setup: Debian 12, Bash, KDE/Gnome

Results I discovered:

The kernel console (TTY) does not support extended modifier sequences like Shift+arrow keys, which means it is not possible to select text using Shift+arrow keys in the Micro editor when running in the TTY.

According to the official man page console_codes(4), the Linux console implements only a subset of the VT102 and ECMA-48/ISO 6429/ANSI X3.64 terminal controls.

In particular, it lacks support for extended input sequences that are handled by modern terminal emulators like xterm. This means the console does not send escape sequences for combined keys such as Shift+arrow keys.

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

For example, I just want to mark text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Setup: Debian 12, Bash, KDE/Gnome

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

Setup: Debian 12, Bash, KDE/Gnome

The core feature I'm searching for:

I just want to mark text/ part of a text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Results I discovered:

The kernel console (TTY) does not support extended modifier sequences like Shift+arrow keys, which means it is not possible to select text using Shift+arrow keys in the Micro editor when running in the TTY.

According to the official man page console_codes(4), the Linux console implements only a subset of the VT102 and ECMA-48/ISO 6429/ANSI X3.64 terminal controls.

In particular, it lacks support for extended input sequences that are handled by modern terminal emulators like xterm. This means the console does not send escape sequences for combined keys such as Shift+arrow keys.

Source Link

Making the micro editor behave like a desktop terminal in a Linux TTY

Can I, through a trick or a module, make the Micro editor behave in a separate TTY as if I had started it directly from a console/terminal emulator in my desktop environment?

For example, I just want to mark text using the arrow keys + Shift.

Is this possible, or is it fundamentally impossible because the Linux kernel console (e.g., tty1) does not support this?

Setup: Debian 12, Bash, KDE/Gnome