Will holding the ALT key depressed for a couple hours hurt the computer?

I was playing poker online where you have the option of using the mouse or hitting keyboard shortcuts. The shortcuts entail hitting ALT plus an appropriate alpha key to call, bet, raise, fold, etc.

I suddenly thought of skotch taping ALT in the depressed state, :slight_smile: so all I’d have to do is hit one key to participate. Once I got the ALT key down, I naturally had to test the Call key. I did so, and immediately found I called an $1800 (play money) all-in bet. LOL.

I had shit for hole cards and lost the hand - of course.

Anyway, if I did the Skotch Tape gambit for 3-4 hours, what damage might I inflict on my computer?

(Still laughing.)

Alt and Ctrl are used in the same way as the shift key. It doesn’t send a character to the computer input buffer. It only modifies what data is sent for the other keys to the input buffer.

No realistic chance at all.

At the motherboard end, there’s a kind of polling chip that monitors the data coming in from the keyboard. When a “real key” is hit, then an interupt signal occurs, a device driver is momentarily invoked, whatever program is taking key presses gets notified, that program deals with it, etc. (There can be several programs in a chain waiting for keys, if the first one realizes that it wasn’t for it, then it is passed on to the next, etc.)

The small amount of extra “effort” the computer puts into handling such a keypress is almost always trivial. But, if the keypress causes an inactive program to become active or some such, then disk swapping can occur and a small amount of extra hard drive usage occurs. But the chances of that extra HD use causing any noticable extra wear-and-tear over any reasonable length of time is small.

OTOH, the “shift” type keys are handled a bit differently. Most programs themselves aren’t interested in just a shift/caps/alt/etc type key being pressed and will only be fed a keypress when the combined key is actually pressed. Only then does the previous sequence of events happens. (There are a few apps that do pay attention to shift key state changes, but not likely your poker plugin.)

(Note to Harmonious Discord: Yes, there really are programs that pay attention to the state of shift keys. In fact, I have written such programs and have even given programming assignments to students that involve tracking such key presses since the usual interupt behavior is a little different than from regular key presses.)

On the keyboard side, there will be a tiny amount of extra wear-and-tear on the circuitry inside the keyboard. Well okay, what’s word for several orders of magnitude smaller than tiny?

I.e., don’t worry about it.

Note that there are some programs for setting the “shift” keys to be “sticky” for use by handicapped people. Maybe, just maybe, one of them can also be set to have the alt key always “down”, in a virtual sense.

Thank y’all.

Yep, but at the BIOS keyboard interface level Ctrl and Alt do odd things. I once (a long time ago) wrote a regularised keyboard handler for PCs (ie a keystroke was delivered to the application as a message with CTRL, ALT, SHIFT modifier flags and a Character or Special key - enter, arrows, editing, function). It was thousands of lines of case statements. The ALT/CTRL/SHIFT flags were ok, but the keycode for a key was different depending on which modifiers were pressed. I hated it, but the code (and the character based mouse/menu/dialog/input framework to go with it) was pretty damn good. But I hated those keycodes :wink:

And all in Modula-2

Si

Not always entirely true, as others have pointed out. And, I take advantage of this by always bringing my computer back from the screen saver by hitting “Shift”, because it works (to dismiss the screen saver), but I know that “Shift” alone won’t do anything in whatever program happens to have focus when the screen saver is gone.

Does the data for a key press of the Ctrl and C button not send a single character to the input buffer? You don’t get two sets do you? One being the ctrl and the other the C. I thought the keyboard it’s self took care of combining the two keys at once, to send on a single character. Yes or no. Maybe I’ve gotten confused.

With ALT taped down (as in the OP) try hitting START. :slight_smile:

There’s several levels of processing. At the lowest level the shift keys and regular keys are processed differently. The “printable” character keypresses are not coded in ASCII. The keypress buffer is quite small and actually wraps around, so you can lose older keypresses if they aren’t processed fast enough. (Not much of problem given CPU speeds.) As the keypresses get moved up the OS chain, they get dressed up to look something more normal (in the case of printable characters) but are encoded for all the F10s, PgDns and such. That’s usually the level intermediate level apps get them (and is possibly the level si_blakely’s program had to deal with).

Different programs, at different levels “see” the characters differently. If you are coding at the lowest level, you get the keypress codes. Going the other way, in generic C++ style cin type character input you only get ASCII. That’s probably the keyboard buffer you’re thinking of. If you go to Unicode programming, then characters can be 2 bytes (or more). Note again that generally the higher level programs don’t directly see/care about shift keys alone. But a few do. So generally, no harm no foul.

I suppose it’s possible that your Alt key could end up apathetic and disinterested in the keys around it, and inclined to contemplate suicide. I am so going to hell for that

ftg thanks for the reply. I didn’t think I was loosing it so badly. I was refering to using the buffer you interface to normally to program today. I haven’t had to program a keyboard routine since the 80’s and they weren’t the IBM type boxes of today. The hardware was different for them all, and you had to poke and peek about to change hardware modes.

Yeah - I was doing the dressing up for a message based architecture. I was getting BIOS level stuff straight from the keyboard buffer. You certainly could detect just a state change of the modifiers (ALT/CTRL/SHIFT) at that point by polling. Interrupts (actually callbacks as I recall) were only generated when a (non-modifier) key was pressed. Or maybe the whole thing was polled - my memory fades.

I wrote the code during a night when I could not sleep - my wife was in hospital under observation after a miscarriage scare with our first. That framework was the best code I have written - our project was let down by others, but not helped by the bed rest my wife needed for several weeks after (she was part of the project, too).

Si

Your question has been answered, but I’ll chime in with “no” as well.
Might I suggest looking for a keyboard with programmable macros?

If you’re using Windows, this is built in. Hit your shift key five times in rapid succession, and it will bring up the sticky keys dialog. I believe if you enable sticky keys, and then hit the Alt key twice, it will be “stuck” in the on state (to Windows, not physically) until you press it again. Probably a better solution than getting icky tape residue on your keyboard.

Thank you muchly DNT!

It seems to work. I’ll give it whirl next time I play poker.

Homer might want to try something like that the next time he’s morbidly obese and stuck at home, monitoring the reactor core for overheating.

Back in the day I used to play Quake 1 with the CTRL key taped down because there was no ‘mouselook’ option in the settings…

As it turns out, it doesn’t work. I had to press the usual keys or use the mouse.

But aha!!!

I WON!!! $4,045,000 in play money

And I Captured the moment with Snagit.

Disagree. Wear and tear comes from continuous operation of a switch, not from leaving the switch in the closed versus normally open position.

The most likely damage you’d do is getting sticky tape residue all over the keyboard. Which, if you’re unlucky, could make it pretty nasty to use. There is a spring that pushes the key back up, and I suppose if you kept it down long enough, it could get weaker at pushing… I don’t think that’s real likely.