EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

OT: Forcing keyboard state

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - Electronics Design - OT: Forcing keyboard state

Goto page Previous  1, 2, 3, 4, 5, 6  Next

Pueblo Dancer
Guest

Fri Feb 03, 2012 2:50 am   



On Thu, 2 Feb 2012 15:44:02 -0800, "Artemus" <bogus_at_invalid.org> wrote:

Quote:
Eons ago when I was running DOS I had a TSR which not only
initialized CapsLock to OFF and also turned it OFF any time the
shift key was hit. If anyone knows a way to do this in XP I'd love
to know how.
Art

Windows 7 turns it off in a 'smart' way. Otherwise, as in password

entry prompt, etc. it pops up a notification about the state of the
keyboard.

Jon
Guest

Fri Feb 03, 2012 4:53 am   



"Robert Baer" <robertbaer_at_localnet.com> wrote in message
news:pOCdnVaKFa4cp7fSnZ2dnUVZ_rSdnZ2d_at_posted.localnet...
Quote:
I have a program, called in a DOS batch file that turns NumLock off.
How does one make a similar program to turn CapsLock on?


Jumping into my way-back machine, I have an 8-byte machine code
program that, by shifting the bit mask used, toggle the num lock, caps
lock or scr lk lamps. The question is, will that drive still access?

I wrote the program in 1986 just as a toy while playing with debug.

I'll look for it tonight.




--- Posted via news://freenews.netfront.net/ - Complaints to news_at_netfront.net ---

Robert Roland
Guest

Fri Feb 03, 2012 11:06 am   



On Thu, 02 Feb 2012 17:48:49 -0800, Pueblo Dancer
<Kachina_at_AllHopiIsLost.org> wrote:

Quote:
Except that he is after the numlock key function, idiot.

Allow me to repeat the second half of his post:

"How does one make a similar program to turn CapsLock on?"
--
RoRo

Robert Roland
Guest

Fri Feb 03, 2012 11:54 am   



On Thu, 2 Feb 2012 15:44:02 -0800, "Artemus" <bogus_at_invalid.org>
wrote:

Quote:
Eons ago when I was running DOS I had a TSR which not only
initialized CapsLock to OFF and also turned it OFF any time the
shift key was hit. If anyone knows a way to do this in XP I'd love
to know how.

A simple AutoIt script can do it. Just put a shortcut to this script
in your startup folder:


AutoItSetOption ( "SendCapslockMode", 0)
#include <Misc.au3>

$dll = DllOpen("user32.dll")

send("{CAPSLOCK off}")
While 1
Sleep ( 250 )
If _IsPressed("A0", $dll) or _IsPressed("A1", $dll) Then
send("{CAPSLOCK off}")
EndIf
WEnd
--
RoRo

Artemus
Guest

Fri Feb 03, 2012 10:53 pm   



"Robert Roland" <fake_at_ddress.no> wrote in message
news:55fni71nsr89g1s38e8omclhsefacifqev_at_4ax.com...
Quote:
On Thu, 2 Feb 2012 15:44:02 -0800, "Artemus" <bogus_at_invalid.org
wrote:

Eons ago when I was running DOS I had a TSR which not only
initialized CapsLock to OFF and also turned it OFF any time the
shift key was hit. If anyone knows a way to do this in XP I'd love
to know how.

A simple AutoIt script can do it. Just put a shortcut to this script
in your startup folder:


AutoItSetOption ( "SendCapslockMode", 0)
#include <Misc.au3

$dll = DllOpen("user32.dll")

send("{CAPSLOCK off}")
While 1
Sleep ( 250 )
If _IsPressed("A0", $dll) or _IsPressed("A1", $dll) Then
send("{CAPSLOCK off}")
EndIf
WEnd
--
RoRo

Thanks. I'll check that out.
Art

Tim Williams
Guest

Sat Feb 04, 2012 3:09 am   



"Spehro Pefhany" <speffSNIP_at_interlogDOTyou.knowwhat> wrote in message
news:sp5li7dlrcvf66vua5cb6aoiegmf5qh33i_at_4ax.com...
<snip>
Quote:
Among other things, it lets you lock the computer easily with one hand
anytime you walk away from it.

You must have small hands :-)

Something else that comes in handy: AutoHotkey. A few simple bindings: I
made Windows+C for Calculator, Windows+I for internet, Windows+O for
Outlook, etc... It does a diversity of scripting so you can add tooltips
and dialogs and keystrokes and macros to essentially any concievable Windows
interface. Pretty cool.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms

Lewis Redmond
Guest

Sat Feb 04, 2012 4:00 am   



On Fri, 3 Feb 2012 20:09:19 -0600, "Tim Williams" <tmoranwms_at_gmail.com>
wrote:

Quote:
"Spehro Pefhany" <speffSNIP_at_interlogDOTyou.knowwhat> wrote in message
news:sp5li7dlrcvf66vua5cb6aoiegmf5qh33i_at_4ax.com...
snip
Among other things, it lets you lock the computer easily with one hand
anytime you walk away from it.

You must have small hands :-)

Something else that comes in handy: AutoHotkey. A few simple bindings: I
made Windows+C for Calculator, Windows+I for internet, Windows+O for
Outlook, etc... It does a diversity of scripting so you can add tooltips
and dialogs and keystrokes and macros to essentially any concievable Windows
interface. Pretty cool.

Tim

Just get a simple MM keyboard.

They have "logoff" keys, and yes, that IS safe under XP and up, IF you
have brains enough to have kept it updated. Some have power keys which
work. They are harder to find.

Spehro Pefhany
Guest

Sat Feb 04, 2012 5:57 am   



On Fri, 3 Feb 2012 20:09:19 -0600, the renowned "Tim Williams"
<tmoranwms_at_gmail.com> wrote:

Quote:
"Spehro Pefhany" <speffSNIP_at_interlogDOTyou.knowwhat> wrote in message
news:sp5li7dlrcvf66vua5cb6aoiegmf5qh33i_at_4ax.com...
snip
Among other things, it lets you lock the computer easily with one hand
anytime you walk away from it.

You must have small hands Smile

Perhaps (and yeah, I know what you're getting at) but the Natural
keyboards are about 8" from Window-key center to L-key center. That's
a bit of a stretch, even pinkie to thumb, for me.

Quote:
Something else that comes in handy: AutoHotkey. A few simple bindings: I
made Windows+C for Calculator, Windows+I for internet, Windows+O for
Outlook, etc... It does a diversity of scripting so you can add tooltips
and dialogs and keystrokes and macros to essentially any concievable Windows
interface. Pretty cool.

Tim

I saw that, but there are enough processes running that I thought a
little registry hack would be a nice touch and not increase that
number.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff_at_interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com

Robert Baer
Guest

Sat Feb 04, 2012 10:39 am   



Dennis wrote:
Quote:
"Robert Baer" <robertbaer_at_localnet.com> wrote in message
news:pOCdnVaKFa4cp7fSnZ2dnUVZ_rSdnZ2d_at_posted.localnet...
I have a program, called in a DOS batch file that turns NumLock off.
How does one make a similar program to turn CapsLock on?




https://www.google.com/search?q=DOS+batch+file+that+turns+NumLock


numlock=on ?


Well, i asked about CapsLock, so i modded the above to correspond and

found a nice instruction set given by M$ that wil work in almost any OS.
Thanks.

Robert Baer
Guest

Sun Feb 05, 2012 3:43 am   



Robert Baer wrote:
Quote:
Dennis wrote:
"Robert Baer" <robertbaer_at_localnet.com> wrote in message
news:pOCdnVaKFa4cp7fSnZ2dnUVZ_rSdnZ2d_at_posted.localnet...
I have a program, called in a DOS batch file that turns NumLock off.
How does one make a similar program to turn CapsLock on?




https://www.google.com/search?q=DOS+batch+file+that+turns+NumLock


numlock=on ?


Well, i asked about CapsLock, so i modded the above to correspond and
found a nice instruction set given by M$ that wil work in almost any OS.
Thanks.
SORRY! M$ *lied*...the instructions give to use were:

To Toggle the CAPS LOCK Key On

1. Use any text editor (such as Notepad) to create the following
file:

a 100
mov ax,0040
mov ds,ax
or byte ptr [0017],40
mov ah,1
int 16
mov ax,4c00
int 21

r cx
0013
n CAPS_ON.COM
w
q


2. Save the file as Capson.deb
3. Type the following line at a command prompt:
debug < capson.deb
This creates an MS-DOS-based program named Caps_on.com that
toggles the CAPS LOCK key on.


Does not work; as far as i can tell, this "program" does nothing
except waste space and time.
Does *not* change the state of CapsLock or anything else.
So..............
Back to the original question:
How does one make a program to turn CapsLock on?

FatBytestard
Guest

Sun Feb 05, 2012 4:16 am   



On Sat, 04 Feb 2012 18:43:30 -0800, Robert Baer <robertbaer_at_localnet.com>
wrote:

Quote:
Robert Baer wrote:
Dennis wrote:
"Robert Baer" <robertbaer_at_localnet.com> wrote in message
news:pOCdnVaKFa4cp7fSnZ2dnUVZ_rSdnZ2d_at_posted.localnet...
I have a program, called in a DOS batch file that turns NumLock off.
How does one make a similar program to turn CapsLock on?




https://www.google.com/search?q=DOS+batch+file+that+turns+NumLock


numlock=on ?


Well, i asked about CapsLock, so i modded the above to correspond and
found a nice instruction set given by M$ that wil work in almost any OS.
Thanks.
SORRY! M$ *lied*...the instructions give to use were:
To Toggle the CAPS LOCK Key On

1. Use any text editor (such as Notepad) to create the following
file:

a 100
mov ax,0040
mov ds,ax
or byte ptr [0017],40
mov ah,1
int 16
mov ax,4c00
int 21

r cx
0013
n CAPS_ON.COM
w
q


2. Save the file as Capson.deb
3. Type the following line at a command prompt:
debug < capson.deb
This creates an MS-DOS-based program named Caps_on.com that
toggles the CAPS LOCK key on.


Does not work; as far as i can tell, this "program" does nothing
except waste space and time.
Does *not* change the state of CapsLock or anything else.
So..............
Back to the original question:
How does one make a program to turn CapsLock on?


Enter each one of those lines manually in the debug editor and see which
one is causing the failure, dumbass.

P E Schoen
Guest

Sun Feb 05, 2012 5:53 am   



"Robert Baer" wrote in message
news:WrmdnclITeB3cbDSnZ2dnUVZ_gSdnZ2d_at_posted.localnet...

Quote:
1. Use any text editor (such as Notepad) to create the
following file:

a 100
mov ax,0040
mov ds,ax
or byte ptr [0017],40
mov ah,1
int 16
mov ax,4c00
int 21

r cx
0013
n CAPS_ON.COM
w
q

Quote:
2. Save the file as Capson.deb
3. Type the following line at a command prompt:
debug < capson.deb

This creates an MS-DOS-based program named Caps_on.com
that toggles the CAPS LOCK key on.

Does not work; as far as i can tell, this "program" does
nothing except waste space and time.

Does *not* change the state of CapsLock or anything else.
So..............
Back to the original question:
How does one make a program to turn CapsLock on?

This just creates the Caps_on.com program but does not run it. You left out
this:

Using the Toggle Programs
Place the appropriate command in the Autoexec.bat or Config.sys file to
automatically toggle the keys you want.

Also:
NOTE: You must be using MS-DOS version 6.x or later. This function was
retained in Windows 95.

and:
This article was written about products for which Microsoft no longer offers
support. Therefore, this article is offered "as is" and will no longer be
updated.

If you do run it, I think it will run in a virtual machine which may not
actually do anything useful with the hardware, such as send a command to the
keyboard.

You might get some success if you run the program in something like
http://www.dosbox.com/, which is a sort of MSDOS emulator which can run some
legacy programs. But it creates a virtual partition in which the programs
run, and I'm not sure how much of the hardware can be accessed. Another
utility that may help is
http://www.softpedia.com/progDownload/PortTalk-Download-101383.html.

You need a BIOS for interrupt calls such as int16 (keyboard driver) and
MSDOS for function calls int21.

How did the other suggestions work?

Paul

P E Schoen
Guest

Sun Feb 05, 2012 5:55 am   



And here's something else using the Windows Script Shell:
http://windows7tipsandtricks.org/notepad-batch-programming-cool-tricks/2011/05/

Paul

UltimatePatriot
Guest

Sun Feb 05, 2012 6:15 am   



On Sat, 4 Feb 2012 23:55:53 -0500, "P E Schoen" <paul_at_peschoen.com>
wrote:

Quote:
And here's something else using the Windows Script Shell:
http://windows7tipsandtricks.org/notepad-batch-programming-cool-tricks/2011/05/

Paul

Looks to me like "windows 7 tips and tricks" website is about as stupid
as it gets.

They are not tips or trick or hacks of any sort.

A couple simple recursive loops.

HOWEVER, if examined closely, it can easily be converted to a single
iteration file.

Robert Roland
Guest

Sun Feb 05, 2012 12:57 pm   



On Thu, 02 Feb 2012 23:07:29 +0100, I wrote:

Quote:
It can even package the
script into a standalone EXE file,

I have saved you some work, and packed the script into an executable
for you:

http://dl.dropbox.com/u/20977779/capson.zip

All you have to do, is to download this file, unpack the EXE and run
it.
--
RoRo

Goto page Previous  1, 2, 3, 4, 5, 6  Next

elektroda.net NewsGroups Forum Index - Electronics Design - OT: Forcing keyboard state

Ask a question - edaboard.com

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony