On-Screen Keyboard
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi guys.
- I would like to make on-screen keyboard.I have no problem in pressing the keys on the keyboard.
- After pressing a key at the moment{pause(2)},I can write one by clicking on the ground.
- I want,the window without changing,I want to print the window.
- I can say is as follows.input text document, trying to guide.
ty
4 Kommentare
Antworten (3)
Walter Roberson
am 25 Mai 2011
I am not at all sure that I understand the question, but I suspect that what you are looking for is the Java Robot class.
Matt Fig
am 25 Mai 2011
I am not sue of your question either. Here is the basic layout of a custom GUI keyboard that I made for a client. Notice that I left all of the callbacks out, so the GUI does nothing right now. The original GUI used complex callbacks including JAVA and ActiveX calls, but I won't include it here. Perhaps you can adapt it to your needs.
function [] = keyboard_gui()
set(0,'units','pix')
SCR = get(0,'screensize');
S.fh = figure('menubar','none',...
'numbertitle','off',...
'name','Friendly Keyboard',...
'units','pix',...
'resize','off',...
'position',[20 20 SCR(3)-25 SCR(4)-80],...
'color',[.5 .5 1]);
S.POS = cell(28,1); % Pre-allocate so we get a column vector.
for ii = 1:26 % Create the letter buttons.
ax = subplot(5,6,ii); % Use SUBPLOT to get alignment.
set(ax,'units','normalized','visible','off')
S.POS{ii} = round(get(ax,'pos')*1000)/1000 - [0 .075 0 0];
delete(ax)
S.pb(ii) = uicontrol('style','push',...
'units','norm',...
'position',S.POS{ii},...
'string',char(64+ii),...
'fontsize',45,...
'fontweight','bold',...
'enable','off');
end
pwidth = S.POS{2}(3)+S.POS{2}(1)-S.POS{1}(1);
S.POS{27} = [S.POS{3}(1) S.POS{26}(2) pwidth S.POS{1}(4)]; % BACKSPACE button.
S.pb(27) = uicontrol('style','push',...
'units','norm',...
'position',S.POS{27}+[0 0 .2705 0],...
'string','Delete',...
'fontsize',35,...
'fontweight','bold',...
'enable','off');
S.pb(28) = uicontrol('style','push',... % The CLEAR button.
'units','norm',...
'position',[0.84625 0.875 .10375 0.11],...
'string','Clear',...
'fontsize',35,...
'fontweight','bold',...
'enable','off');
S.ed = uicontrol('style','edit',...
'units','norm',...
'position',[0.05 0.875 0.7825 0.11],...
'fontsize',50,...
'fontweight','bold',...
'horizontalalignment','left',...
'enable','off');
set(S.pb,'backgroundcolor',[.9 .6 .6])
drawnow % Flush event queue
13 Kommentare
Walter Roberson
am 25 Mai 2011
@Matt, I understood "exam :text document" to mean "for example, write in to a text editor's window".
@nsbd: We are still trying to understand what you are trying to do. I do not understand yet why the psh_la_Callback code I suggested is not usable?
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!