• Re: ALternative to # for commands (such as #loot).

    From B. R. 'BeAr' Ederson@21:1/5 to Black Pearl on Wed Jan 22 06:19:23 2025
    On Tue, 21 Jan 2025 17:31:49 -0600, Black Pearl wrote:

    Black Pearl wrote:
    I use these to such an extent that I'd really like a way to do this
    character without involving the shift key.

    Sometimes I see it written:

    M-x <---- How do you do this with the keyboard?

    M stands for "Meta"-key. It depends on your OS, which key this refers to.
    On MS Windows, it is the <ALT> key, for example.

    https://nethackwiki.com/wiki/Alt

    BeAr
    --
    ===========================================================================
    = What do you mean with: "Perfection is always an illusion"? = ===============================================================--(Oops!)===

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kevin J Witczak@21:1/5 to Black Pearl on Sat Jan 25 21:42:49 2025
    Black Pearl <[email protected]> writes:

    B. R. 'BeAr' Ederson wrote:
    On Tue, 21 Jan 2025 17:31:49 -0600, Black Pearl wrote:

    Black Pearl wrote:
    I use these to such an extent that I'd really like a way to do this
    character without involving the shift key.
    Sometimes I see it written:
    M-x <---- How do you do this with the keyboard?
    M stands for "Meta"-key. It depends on your OS, which key this refers
    to. On MS Windows, it is the <ALT> key, for example.
    https://nethackwiki.com/wiki/Alt BeAr



    Okay. For some reason I thought it was the escape key and wasn't
    getting anywhere. Thank you.



    It is kind of Escape -- on Unix / Linux systems, when there is no native
    Meta key on the keyboard, there is a convention that Meta becomes Escape
    or when using Alt an Escape character is emitted in conjunction with a
    typed character. So it's both.

    Really, for NetHack or other games and applications that live in the
    terminal, it depends on how you configure the OS and terminal to process keystrokes. You can also type Meta/Escape on Unix terminals with C-[, or Ctrl+[.

    Historically, what Meta was meant to have done on very old terminal
    hardware, was you'd have your normal 7-bit ASCII chars bound to the
    usual character keys, plus Shift for uppercase &c., plus Ctrl to emit
    control characters (used to send special signals to the terminal/running program), but as computers standardised on using 8-bit words (bytes),
    you had an extra bit on the end of every character which your software
    may not be using for something else (error checking or whatever), and
    Meta became like a Shift key that toggled that final bit, allowing you
    to type extra characters from an extended range, ASCII + 128 more chars,
    in the same way that Shift allows you to use the (lowercase) letter keys
    to type twice as many letters by shifting up the case.

    These days, on non-Windows, non-Java platforms, ASCII characters are
    mostly encoded via UTF-8, an ASCII-compatible version of Unicode, in
    which the 8th bit of each ASCII character must be set to zero, so having
    a Meta key toggle that final bit of the typed character is arguably
    wrong or at least usually not wanted, as it produces malformed text (as
    far as the terminal is concerned). Thus, it's become convention to have whatever your Meta key is instead act to modify the character typed by prefixing it with Escape.

    The reason you see people using M-x this way, to type extended commands
    in NetHack, is because that's a standard usage in the influential text
    editor Emacs -- M-x for an eXtended command.

    If you're on Windows, how these keys are interpreted will be wildly
    different because Windows, even in its command lines like cmd.exe and powershell, generally doesn't seek to emulate the way Unix terminals
    behave; and also Windows natively uses a different version of Unicode,
    UTF-16, which is not ASCII compatible to begin with.

    --
    ;; Basically just a Boltzmann brain with extra steps.
    ;; -*- (rfc1924 "YiVsRYGrgTcVTuwaB^>SZ*Fa2X>2ZIXa") -*-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)