IRC Lurker

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Jangie
Posts: 2
Joined: Sat Nov 05, 2005 5:02 am

IRC Lurker

Post by Jangie »

Hey guys, I've made a halfway irc client... still quite in draft form. I posted on PSPUpdates' forum... click through to see more.

http://forums.qj.net/showthread.php?t=24903

Arwin, I'll be putting in Psprint when I can... this is the app I was talking about.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Re: IRC Lurker

Post by Arwin »

Jangie wrote:Hey guys, I've made a halfway irc client... still quite in draft form. I posted on PSPUpdates' forum... click through to see more.

http://forums.qj.net/showthread.php?t=24903

Arwin, I'll be putting in Psprint when I can... this is the app I was talking about.
Ok. If you need any help, let me know. Basically, what you do is:

include p_sprint.h

put this up somewhere as a global variable so you can also look at previous keypresses if necessary (sometimes useful):

struct myKey as p_spKey

and then in your main loop where you read the controller for, say, mouse input through the analog controller, you add this:

p_spReadKeyEx(&myKey,pad.Buttons)
if(myKey.keycode > 0)
{
// a key was pressed
switch(myKey.keycode)
{
// deal with the special codes like backspace, enter and so on
// keycodes correspond with default WinPC keycodes, which you
// can find in the online documentation if necessary

// check for modifiers if necessary in myKey.modifiers
// where CTRL = 1, SHIFT = 2, ALT = 4, CTRL+SHIFT = 3, etc.

// if no special keys you want to handle were pressed,
// you can just output the character value in myKey.keychar
}
}

For a more detailed example you can look at the sourcecode of the p_sprint test application, which contains something very similar to the above.
Post Reply