実現方法
test.page
<!-- 修正前 ※入力項目にフォーカス時、Enterキーを押下でSubmitしてしまう -->
<apex:commandButton value="ボタン" action="{!method}" styleClass="slds-button slds-button_neutral" />
<!-- HTML読み込み時、typeがsubmitになるため -->
<input type="submit" value="ボタン" class="btn slds-button slds-button_neutral">
<!-- 修正後 -->
<!-- buttonなのでEnterキーで起動しない -->
<button type="button" class="slds-button slds-button_neutral" onclick="method();">
ボタン名
</button>
<!-- onclickからApexを起動 -->
<apex:actionFunction name="method" action="{!method}"/>
※apex:commandButtonのtype(html-type)をbuttonに上書きしようとしたら「apex:commandButtonの属性「type」は上書きできません」とエラーになりました。
参考リンク
その他の方法
Enterキーの無効化