cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Do not invoke Shift+P shortcut action in the Structure browser when entering text in a text field

Do not invoke Shift+P shortcut action in the Structure browser when entering text in a text field

The Windchill 11.1 WebGL visualization is awesome, but very frustrating while working on a product structure. If the user enters text into almost any field on the page, a Shift+P combination will be interpreted as the shortcut to open the WebGL Preferences panel.

 

I don't disagree with the key combination, I disagree with Windchill looking at the text I am entering a text input field for any WebGL shortcuts. Some users habitually type in .PRT when looking at CAD and the first Shift+P they enter brings up the WebGL preferences panel.

 

The search boxes are all case in-sensitive in Windchill, so I can educate users about not using Shift+P as a work-around for now, but it would be nice to have PTC's UX team review these new implementations to ensure they are compliant before released.

7 Comments
Amethyst
Status changed to: Clarification Needed

Hi Scott,

 

The intention was that the keyboard shortcut should only be activated when the WebGL Viewer has active focus by the user (meaning they have clicked inside the viewer) and not when they are working anywhere else in the user interface.

 

If you are seeing a different behavior than that, it would be good if you open a support ticket (or reach out to me if one has already been opened) so that we can take a look at this behavior as a defect.

 

In future releases we are also looking at provide a new preference mechanism for the viewer as we expand the scope of  configuration options for it's behavior.

Visitor

https://www.ptc.com/ja/support/article?n=CS271197

The WebGL Viewer Preferences dialog is opened from within the Creo View WebGL Viewer (in all places) using the Shift+P shortcut (Ctrl-P for Safari on Mac OS X)

 

It's enough to change "Shift+P" to "Ctrl+P" on Windows.

Users can't change the setting, right?

Moonstone

@romorrison take a look at this technical support call: https://support.ptc.com/apps/case_logger_viewer/auth/ssl/case=15042722

 

i spoke with a TSE and their manager and could not get past them. i was adamant this issue should be looked at by Product Management or UX and the TS team refused. it was frustrating to report such an odd behavior and have technical support tell me this is the way its supposed to work. eventually i gave up and created this idea since because they refused to do anything for me. 

 

the Ctrl-P action is picked up in all text fields of the PSE if the visualization tab is active. its frustrating for users. i have been coaching them to just not use capital P in their searches or input since it is case insensitive. personally, i have no idea how this could have passed any level of UAT. 

Regular Member

This behavior is defined in 

<Windchill Home>\codebase\wtcore\jsp\wvs\js\ptc\thingview\thingview.js

with

 

function _addpreferenceevents() {
    var re = new regexp("version\\/(\\d+).+?safari", "i");
    var safari = navigator.useragent.match(re);
    document.addeventlistener("keydown", function(event) {
        if (safari) {
            if (event.ctrlkey && event.code == 'keyp') {
                thingview.openpreferencesdialog();
            }
        } else {
            if (event.shiftkey && (event.code == 'keyp' || event.keycode == 80 /*p*/)) {
                thingview.openpreferencesdialog();
            }
        }
    }, false);

 

This code can be replaced by

 

function _addPreferenceEvents() {
    var re = new RegExp("version\\/(\\d+).+?safari", "i");
    var safari = navigator.userAgent.match(re);
    document.addEventListener("keydown", function(event) {
		if (event.ctrlKey && event.code == 'KeyP') {
			ThingView.OpenPreferencesDialog();
		}
    }, false);

 

Now, The only possible way to launch the Preferences Popup (Safari and any browser on Windows) is Ctrl+P.

 

Normally, the Ctrl+P is assigned to Print (for majority of the windows browsers). You can Choose any other shortcut if desired.

(After changing the JS file, it is recommended to shutdown windchill, clear caches, then start windchill)

 

This code was tested in 11.1 M020 and 11.2.1.0.

Amethyst
Status changed to: Implementation In Progress
 
Amethyst

This has been addressed as a bug fix under SPR 9598641 in Windchill 12.0.0.0.  The resolution in the SPR addresses that the keyboard shortcut validates that a input field does not have the focus.  I would recommend requesting a CPS fix rather than going down the route of customizing the Thingview.js file.

Regular Member

@romorrison wrote:

This has been addressed as a bug fix under SPR 9598641 in Windchill 12.0.0.0. The resolution in the SPR addresses that the keyboard shortcut validates that a input field does not have the focus. I would recommend requesting a CPS fix rather than going down the route of customizing the Thingview.js file.


Thank you for the update.

This SPR is only for PTC. Can you provide an update in this idea, after the a new CPS is delivered?