From: mike on
I use this to get button-down, button-up events working:

function pushbutton1_ButtonDownFcn(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

disp('down')
set(hObject,'Value',1)

% --- Executes on mouse press over figure background, over a disabled or
% --- inactive control, or over an axes background.
function figure1_WindowButtonUpFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

if get(handles.pushbutton1,'Value')==1 %add more conditions here to check which %button is pushed
disp('up')
end
set(handles.pushbutton1,'Value',0)