this post was submitted on 23 May 2025
721 points (98.3% liked)

linuxmemes

25123 readers
1157 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. ๐Ÿ‡ฌ๐Ÿ‡ง Language/ัะทั‹ะบ/Sprache
  • This is primarily an English-speaking community. ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡บ๐Ÿ‡ธ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • ย 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
    you are viewing a single comment's thread
    view the rest of the comments
    [โ€“] chrisbtoo@lemmy.ca 83 points 6 days ago (17 children)

    I feel like I should understand this, but I don't.

    [โ€“] waigl@lemmy.world 207 points 6 days ago* (last edited 6 days ago) (14 children)

    This is x86 assembler. (Actually, looking at the register names, it's probably x86_64. On old school x86, they were named something like al, ah (8 bit), ax (16 bit), or eax (32 bit).) Back in the old days, when you pressed a key on the keyboard, the keyboard controller would generate a hardware interrupt, which, unless masked, would immediately make the CPU jump to a registered interrupt handler, interrupting whatever else it was doing at the point. That interrupt handler would then usually save all registers on the stack, communicate with the keyboard controller to figure out what exactly happened, react to that, restore the old registers again and then jump back to where the CPU was before.

    In modern times, USB keyboards are periodically actively polled instead.

    [โ€“] WhyJiffie@sh.itjust.works 28 points 6 days ago (9 children)

    does that mean though that if I connect a PS/2 keyboard or mouse to my relatively modern computer (a "gamer" motherboard made ~6 years ago) 's PS/2 port, that it'll still trigger such an interrupt?

    [โ€“] atomicbocks@sh.itjust.works 28 points 6 days ago (1 children)

    The other commenter is on the right track but the chip controls both USB and PS/2 as well as others;

    In the 90s and 2000s, for x86 machines, slower I/O was handled by a chip called the Southbridge which worked in conjunction with a chip called the Northbridge that handled faster I/O like IDE and PCI. Later these were integrated into a single chip and, as of recent processor generations, into the processor itself.

    AFAIK ghosting and key rollover are issues when using PS/2 but it can offer some milliseconds off latency when used in high cpu games.

    [โ€“] DeRp_DaWg@lemmy.world 9 points 6 days ago* (last edited 6 days ago) (2 children)

    AFAIK ghosting and key rollover are issues when using PS/2

    I think it's more of an issue for USB keyboards than PS/2 keyboards.

    [โ€“] herrvogel@lemmy.world 17 points 5 days ago

    They are wholly independent from the protocol or interface. Ghosting is an electrical issue that is a result of keyboards being a bunch of switches arranged in a matrix. It makes the keyboard's controller register an extra keypress in certain conditions. Nothing to do with how the thing communicates with the host computer.

    Key rollover issues can be related to ghosting. The limit for it is once again the keyboard's design at the circuit level, not its communication protocol.

    Really they're both related to how cheaply built the keyboard is. That's the only thing.

    [โ€“] ugo@feddit.it 11 points 5 days ago

    Ghosting entirely depends on the wiring of the keyboard pcb. Key rollover can depend on the wiring of the keyboard pcb, but usually is limited by the usb HID protocol.

    Generally speaking, usb can carry up to 6 keys of information in a single packet (I donโ€™t remember off the top of my head if modifiers are included). It is possible to use extended packets and encode more info (and thus allow for more than 6 keys rollover) but it requires negotiation with the os so most vendors donโ€™t bother as generally you donโ€™t need to be able to press more than 6 keys at the same time for most applications.

    load more comments (7 replies)
    load more comments (11 replies)
    load more comments (13 replies)