From: "Yair Altman" <altmanyDEL@gmailDEL.comDEL>
Newsgroups: comp.soft-sys.matlab
Subject: Re: java: add keyListener to command window
Date: Thu, 6 Aug 2009 09:01:19 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 12
Message-ID: <h5e64v$ktv$>
References: <h5cd5u$pi5$> <h5ctj0$dqc$> <h5e4r5$99u$>
Reply-To: "Yair Altman" <altmanyDEL@gmailDEL.comDEL>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1249549279 21439 (6 Aug 2009 09:01:19 GMT)
NNTP-Posting-Date: Thu, 6 Aug 2009 09:01:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: comp.soft-sys.matlab:561249

>  What do you achieve with 'xCmdWndView = cw.getComponent (0).getViewport.getComponent(0)' ?
> I thougt 'h_cw = mde.getClient('Command Window')' is the handle to command window.

this h_cw reference is only a reference to the container of the Command Window (including the scrollbars etc.), so setting the callbacks on it doesn't work. You need to set it on the actual edittable pane, which is xCmdWndView 

>  How do i reset the callback, with 'set(h_cw,'KeyPressedCallback',' ')'?


Yair Altman