[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Kde::instantMessaging()?
From:       Neil Stevens <neil () qualityassistant ! com>
Date:       2002-12-01 23:36:55
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday December 01, 2002 03:26, Whitehawk Stormchaser wrote:
> > > ...and for Kit (Neil: Listen) I have another question... can I build
> > > a patch for a multi-line edit in the mesage window? I build one for
> > > KYIM and well... I can asily make another one for KIT...
> >
> > Oh, patches are always nice.  :-)
> >
> > But, will it work?  How will one distinguish between pressing enter to
> > send a message (long-established habit for users of ksirc and kit),
> > and pressing enter to go to the next line (long-established habit for
> > users of multilineedits)?  If we can work out a solution to that
> > problem, I'd gladly add the support (even going as far as to write it
> > myself :-)
>
> Well... This is fairly simple... I have resolved this way:
>
> void ChatWindowImpl::keyPressEvent(QKeyEvent * ev)
> {
> 	if (ev->key() == 4129)
> 		lbreak = true;
> }
>
> void ChatWindowImpl::keyReleaseEvent(QKeyEvent * ev)
> {
> 	if (ev->key() == 4129)
> 		lbreak = false;
> }
>
> See? This will se lbreak to true, if ctrl is held by pressing enter and
> allow only to switch to another line, without submitting the text over
> the protocol... The code goes something like this, which goes with the
> lines above:

So you have it use ctrl-enter to move to the next line, keeping enter for 
sending?  Sounds fair to me, thanks.

- -- 
Neil Stevens - neil@qualityassistant.com
Delenda est Carthago
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE96p0Xf7mnligQOmERAl/PAJ9FifJ7xa+5EWRx3P/D9nTTGqD2VgCfXOtg
gOKMz0eReiYpZwTY9+WxJYQ=
=0a3A
-----END PGP SIGNATURE-----

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic