473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

GetKeyState UNIX?

i am altering some Win32 C++ code. The code is for ASCII Pac-man. I need a replacement for GetKeyState() because it used windows.h. Can I use the windowsx.h included with my WINE? Orr it would be even better if I could use a native UNIX lib.
Sep 9 '07 #1
5 3358
JosAH
11,448 Expert 8TB
Have you tried the (n)curses library?

kind regards,

Jos
Sep 9 '07 #2
Have you tried the (n)curses library?

kind regards,

Jos
Thanks, don't know why I didn't try that. Is ncurses cross platform? What command would I use?

I'm a C++ beginer, trying to learn as I program...
Sep 9 '07 #3
I don't even seem to have ncurses. I am using macosx. I want my code to be able to be built on any OS with a C++ compiler. I have curses.h, could I use that?
Sep 9 '07 #4
JosAH
11,448 Expert 8TB
I don't even seem to have ncurses. I am using macosx. I want my code to be able to be built on any OS with a C++ compiler. I have curses.h, could I use that?
I guess so; "ncurses" is just a "new curses" implementation. I think curses is
available on about any unix thing that can say "beep!".

kind regards,

Jos
Sep 10 '07 #5
I guess so; "ncurses" is just a "new curses" implementation. I think curses is
available on about any unix thing that can say "beep!".

kind regards,

Jos
Thanks, it accually looks like my curses.h is ncurses. man ncurse says to invoke it with #include <curses.h.>. I think that's all the help I need for now...
Sep 10 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Matthew | last post by:
How would I go about creating a simple "hello world" program that will run in Unix. I am using MS Visual C++.
5
by: jrefactors | last post by:
when people say unix programmer, does it mean they write programs in unix environment,and those programs are run in unix platform? it is not necessary they are using unix function calls? I heard...
22
by: Ryan M | last post by:
I've been programming for a while, but most of my experience is on unix. How do C compilers work on operating systems that weren't written in C? And that have no libc? Compiling C on unix seems...
18
by: Sharon | last post by:
is microsoft going to develop .Net for Unix? or at lest CLR for Unix? 10x
5
by: Markus Wildgruber | last post by:
Hi! Is there a substitute in the .NET Framework for the GetKeyState(...) function? I want to check whether the shift key is pressed. What's the best way to do this? Do I have to use...
4
by: melanieab | last post by:
Hi, I need to check and see if a Tab key was pressed. I found GetKeyState() but that only seems to be for Visual Basic. Is there anything like it for c#? (GetKeyName didn't seem too promising...
15
by: Alpha | last post by:
I was told that Unix API can only be called using C++, ATL and MFC. However, I was also told that C# can do that through Pinvoke to a DLL that interfaces with the Unix API. Can someone direct me...
22
by: Xah Lee | last post by:
The Nature of the “Unix Philosophy” Xah Lee, 2006-05 In the computing industry, especially among unix community, we often hear that there's a “Unix Philosophy”. In this essay, i...
5
by: ats | last post by:
Hi there, I have the following Function and Const declarations in my project: Public Declare Function GetKeyState Lib "USER32" Alias "GetKeyState" (ByVal nVirtKey As Long) As Integer Public...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.