![]() |
| | #1 |
| Registered User Join Date: Sep 2002
Posts: 14
| How do you toggle keys like Scroll lock without Windows API? The reason for not wanting to use the Windows API is because if I were on Linux, Unix or DOS, I wouldn't be able to utilize the windows API since it isn't installed. |
| animeaholic is offline | |
| | #2 |
| Registered User Join Date: Jul 2002
Posts: 945
| well which do you want? dos? linux? macOS?
__________________ hello, internet! |
| moi is offline | |
| | #3 |
| End Of Line Join Date: Apr 2002
Posts: 6,240
| Something like that is going to be hardware/OS specific, so you won't be able to write anything using purely standard C++ functions.
__________________ When all else fails, read the instructions. If you're posting code, use code tags: [code] /* insert code here */ [/code] |
| Hammer is offline | |
| | #4 |
| Registered User Join Date: Sep 2002
Posts: 14
| More specific: Since there isn't a standard for all computers using C++, how would you toggle keys using DOS? |
| animeaholic is offline | |
| | #5 | |
| End Of Line Join Date: Apr 2002
Posts: 6,240
| Re: More specific: Quote:
__________________ When all else fails, read the instructions. If you're posting code, use code tags: [code] /* insert code here */ [/code] | |
| Hammer is offline | |
| | #6 |
| Registered User Join Date: Sep 2002
Posts: 14
| Clarification What I mean by DOS is that It is a dos based program, it doesn't use the windows API and it isn't in a Windows Console window. The code should be able to run in both a dos prompt or in MS-DOS mode. |
| animeaholic is offline | |
| | #7 |
| Skunkmeister Join Date: Aug 2001
Posts: 2,572
| Whichever os you need this for will require different things. For instance a console window will need to use win32 api. In DOS it can be accomplished by calling an interrupt with the registers set correctly. Ralf browns interrupt list should help there. On linux I dont know. You will have to research that too. Then when you have all the different methods you can use the preprocessor and conditional compilation to maintain a single-source.
__________________ Free the weed!! Class B to class C is not good enough!! And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi |
| Stoned_Coder is offline | |
| | #8 | |
| Registered User Join Date: Jul 2002
Posts: 945
| Quote:
__________________ hello, internet! | |
| moi is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Want to learn Windows API for Game Programming | George M. | Windows Programming | 15 | 09-28-2008 10:26 AM |
| Windows API | valaris | Windows Programming | 7 | 08-01-2008 12:37 AM |
| windows api file functions | xixpsychoxix | Windows Programming | 8 | 07-01-2008 04:26 PM |
| windows api functions, not working. requirements? | Mr.Bit | Windows Programming | 5 | 10-10-2007 08:20 AM |
| MFC or Windows API | aresashura | Windows Programming | 7 | 12-01-2001 10:21 PM |