|
|
|
#1 |
|
Registered User
Join Date: Nov 2002
Posts: 4
|
Text Editor
I´m making my own text editor in C and i cant figured out something: How can i know if the user is pressing shift or ctrl? I use Linux so those DOS libraries won´t work. |
|
|
|
| Advertisement | [Remove Advertisement] |
|
|
|
|
|
#2 |
|
Registered User
![]() ![]() ![]() ![]() ![]() Join Date: May 2001
Location: Hungary
Posts: 2,184
|
i think they have their own keycode, but i'm not sure. there are some experienced C programmers here, so expect a real answer from them ^^ nyaa |
|
|
|
|
|
#3 |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Apr 2001
Location: Cleveland OH, USA
Posts: 1,438
|
Are you using SDL? SDL handles it fine, under the key mod stuff. - Exo |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Nov 2002
Posts: 4
|
Sometimes I use Allegro but what I really want to know is how to do it using only C Ansi. I think that´s the better way to learn. But thanks for your post anyway.
|
|
|
|
|
|
#5 |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Mar 2002
Location: Vienna/Austria/Europe
Posts: 1,168
|
If you write an X application, it's easy: Both pressing and releasing the Shift or Ctrl-Button creates a KeyPress/KeyRelease Event. If you write a console application, it's hard.
__________________
If you think my English is bad, wait till you read my Polish. |
|
|
|
|
|
#6 | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Apr 2001
Location: Cleveland OH, USA
Posts: 1,438
|
Quote:
- Exo |
|
|
|
|
|
|
#7 |
|
Transcended
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2001
Location: Moonlight Spire
Posts: 1,409
|
Today, building everything from scratch isn't practical anymore. takes too long and too darn difficult. I used to have that approach, but when it came to actual formal programming, the time constraints imposed are simply too great to consider reinventing the wheel.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|