• sunset@reddthat.com
    link
    fedilink
    English
    arrow-up
    27
    ·
    1 day ago

    Trying to copy some text in a Linux terminal and instead just ending a process 🆘

    • toynbee@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      1 day ago

      In many cases, perhaps most, you can use Ctrl+shift+c/v to get around this. This muscle memory has caused problems for me because Ctrl+shift+c in Firefox brings up the development console (IIRC) and I haven’t found a way to close that without using the mouse.

      Depending on your environment, you may also be able to highlight text, press no keys, and middle click elsewhere to paste.

        • toynbee@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          ·
          1 day ago

          It never occurred to me to even check whether it can be disabled. I suspect you have improved my life and thank you for doing so!

      • sunset@reddthat.com
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        Yeah I know about Ctrl+Shift+C I was joking, I think we’ve can all relate to accidentally sending a interrupt signal every now and then!

        Now tell me how to copy text from nano and paste it elsewhere! 😆

        • toynbee@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          It did seem likely you would know, but if I can, I’d prefer giving someone redundant knowledge over hoarding information they could use.

          I can definitely relate to accidentally ending a process, especially back when I used PuTTY. Very frustrating.

          I use vim, but I’ve never had trouble copying text out of it the same way I would out of any other terminal process. Does nano introduce special challenges?

          • sunset@reddthat.com
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            If you highlight text in nano using your keyboard I think it uses nanos built-in highlighting and doesn’t allow copying to the clipboard. It has it’s own built in cut and paste system, and not on the keys you would expect.

            If you highlight the text with your mouse it uses the terminals highlighting and copying to your clipboard works!

            Just lot’s of inconsistency is what I’m saying, similar to your Firefox experience!

            • toynbee@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              1 day ago

              Oh yeah - if you’re using your keyboard, it’s a different prospect. In vim, I would use the yank functionality, but that doesn’t travel between windows. I wouldn’t know how to do that without the mouse.

              I’m afraid I can’t help you with nano, either, but good luck in your search!

        • CrazyLikeGollum@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 day ago

          Can’t tell you about nano, but in Vi it’s yy to copy (or yank) a line, insert a number between the y’s to copy more than one line. I.e. y5y to yank 5 lines.

          Then p to paste.

          Can also just use your terminals method for copy paste, just remember to hit i for insert before you paste.

        • toynbee@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          I almost exclusively use a trackball, specifically a Kensington Orbit. If you care to click the link, you’ll see it has no physical middle click; instead, it emulates one if you simultaneously left and right click. I originally found this uncomfortable, especially because its functionality was less reliable when I discovered it; since then, though, it has improved with newer models and I’ve gotten much more practice using it. I now find it eminently usable - enough even to perform in games and such.

          Now my only real issue is the actual scrolling. I don’t use it to scroll documents very often, but once the ring starts spinning, it continues doing so pretty freely. When gaming, this can make it challenging to switch weapons with any precision. One of my friends described it not as a scroll wheel, but a selection randomizer.

          • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 day ago

            At first I wanted a trackball mouse, now I just want a USB ThinkPad style keyboard instead, which I’d probably get if I had a desktop.

            I basically don’t have to move my arms, the mouse is in middle of the keyboard. After a while it feels not like a pointing device, but an extension of the finger.
            Scrolling long pages is also pretty nice. Press down middle-click with thumb, push down/up TrackPoint with index finger. I can just keep scrolling without moving fingers, just varying pressure.

            But it’s not perfect either. There’s often some drifting. As far as I know, it continually calibrates itself, to prevent drift in most cases. Well, if you’ve just been scrolling down for a while and let go, the mouse pointer will drift upwards for a bit. Similar to if you’ve been resting a finger on it without doing anything. It got recalibrated as your finger literally being a part of it.
            You just have to… wait a few seconds. Annoying but not too bad.

            • toynbee@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              23 hours ago

              That seems achievable.

              edit: Back in the nineties or aughties, I had something similar to this. I wouldn’t recommend it for anyone, but it does seem to have goals similar to yours.

        • toynbee@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          One of the few times I’ve been able to appreciate their eccentricities was when using Ctrl+w to delete a word in a shell environment in a remote desktop environment inside a web browser. I pressed the key combination out of habit, cringed as I realized I’d just closed the tab and would have to reauthenticate several times to get back to it, then was delighted to realize I hadn’t closed the tab because I hadn’t passed command+w.