osmdamv give me a hint to find "Wicketsolution" for my problem. Now here is my code to catch Keypress and send only in some cases ajaxrequest to wicketserver.
In this example, another user may be able to adapt this code to their needs.
public HomePage(final PageParameters parameters) { super(parameters); add(new AjaxEventBehavior("keydown"){ @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); IAjaxCallListener listener = new AjaxCallListener(){ @Override public CharSequence getPrecondition(Component component) {
Edit:
Insert attributes attribute.setAllowDefault (true). Now it works correctly.
Malte source share