HostKey クラス

com.ibm.hats.rcp.transform.HostKey クラスは、個々のホスト・キーを ボタン (org.eclipse.swt.widgets.Button クラス) または リンク (org.eclipse.swt.widgets.Link クラス) として 表します。複数のキーを 1 つの HostKey インスタンスに 組み込むことはできません。複数のキーが必要な場合は、 複数の HostKey インスタンスを定義してください。以下のコード例は、ボタンとして表示される HostKey を示しています。これを押すと、ホストに [PF1] が送信されます
hostKey = new HostKey(this, SwtTransformationConstants.BUTTON);
hostKey.setText("F1");
hostKey.setCommand("[pf1]");
hostKey.addSelectionListener(new org.eclipse.swt.events.SelectionListener() {
    public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        com.ibm.hats.runtime.services.ISessionService 
                                    sessionService = getSessionService();
        if (sessionService != null) {
            sessionService.sendCommand(hostKey.getCommand());
        }
    }
    public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) {
    }
});