Thursday, November 30, 2023
Home3D ModelingBug – Alt Key Not Releasing The Menu Bar Focus - SketchUp

Bug – Alt Key Not Releasing The Menu Bar Focus – SketchUp


Creating one other script I stumbled upon a difficulty that I had not beforehand observed concerning Undo.

The next script has severed me nicely since SketchUp 2021:

module PMC
	module AssignToTag

		lengthen self

		MENU ||= "Extensions"

		def assign_to_tag(assigned_tag)

			mannequin = Sketchup.active_model		
			mannequin.start_operation("Assigned to Tag: #{assigned_tag.title}")
			mannequin.choice.every 
				t.layer = assigned_tag if t.layer!=assigned_tag
			
			mannequin.commit_operation

		finish

		if !outlined?(@ui_loaded)

			add_separator_to_menu(MENU)
			menu = UI.menu(MENU).add_submenu("Assign to Tag")

			Sketchup.active_model.layers.kind.every { |tag|
				tagname = tag.title
					if tagname == "Layer0"
						tagname = "Untagged"
					finish
				menu.add_item(tagname) { assign_to_tag(tag) }
			}

			@ui_loaded = true
			
		finish

	finish
finish

( the extension is restricted to me and never meant for launch because it has limitations )

I assign keyboard shortcuts to a few of the Assign Tag instructions.

On start-up, in 2023 ctrl z doesn’t work until I’ve clicked wherever within the modelling area, or orbited or panned. After I’ve executed this, ctrl z works as anticipated each time I’ve assigned a tag through my extension.

Curiously, if as an alternative of doing ctrl z I’m going to Edit>Undo…, Undo works as anticipated.

In 2022 I can invoke the keyboard Assign Tag shortcut after which carry out a ctrl z and the tag task is undone – each time together with for the primary time after start-up.

I’ve executed a Restore as administrator and the issue persists.

Curiously once more, in 2023 Alt+Backspace can be set as a shortcut for Undo in addition to ctrl z however I can’t delete it – whereas in 2022 I can delete Alt+Backspace.


From Google:
Is Alt Backspace is used for undo?

In most Microsoft Home windows purposes, the keyboard shortcut for the undo command is Ctrl+Z or Alt+Backspace, and the shortcut for redo is Ctrl+Y or Ctrl+Shift+Z.

Is the alt+backspace arduous wired?

That is bizarre.

In 2023, on start-up, if I do Alt+Backspace as Undo for the very first time an Undo happens however not with ctrl z.

How do you imply?

If I assign a tag utilizing Entity Data there isn’t a drawback in any respect utilizing ctrl z in 2023

I ponder if that is someway attributable to the rework of the GUI on SketchUp for Home windows to make use of Qt for 2023?

After various repairs I made a decision to uninstall and re-install ( deleting SharedPreferences.json recordsdata in all my Roaming SketchUp folders in order that the brand new set up wouldn’t import earlier shortcuts ).

Downside persists in 2023 and Alt+Backspace can’t be deleted like in 2022 ( although it &%*@$ $%-ing comes again after restart ).

Nicely, it’s trusty AutoHotkey to the rescue – assign ctrl z ( really z ) to Alt+Backspace.

May very well be the brand new Qt framework…?

It isn’t listed within the home windows shortcuts, I did a reasonably deep dive.

Deleting all recordsdata within the Roaming folder is a really drastic step that shouldn’t be executed, till getting suggestions from Trimble. Ie, … shortcuts are usually not attributable to extensions as a result of the API solely permits itemizing them. There isn’t a API publicity to set them as they’re thought of a person personal operate.

To reset person shortcuts, 1st export them to a file.
Shut SketchUp.
Then edit (delete) the "SharedPreferences.json" shortcuts within the ""Home windows Solely/Settings" object. Ensure that to set the "Num_Shortcuts" to the right quantity (doubtless 0.)
Then resave the json file.

As a result of it is arduous coded. Most of the “utility degree” shortcuts have at all times been hard-coded and don’t seem within the person shortcuts within the JSON recordsdata nor within the registry in older variations.

I filed a “grievance” about not having the ability to change the CTRL+SHIFT+I shortcut as we might previous to 2023. (I take advantage of it to deliver up the Chrome Developer Instruments.)
In 2023 it’s hard-coded to Edit > Invert Choice and can’t be modified.

Brad famous that for a few of these shortcuts, they beforehand (pre-2023) might be modified per session, however reverted again when SketchUp was restarted.

Colin proposed that the shortcuts utilizing CTRL are “system shortcuts” and can’t be completely modified.

I’ve proof that such shortcuts may be modified. In Home windows Notepad++ we will can change any shortcut we want. Even CTRL+O, CTRL+S. (I simply did it as a result of I don’t use these shortcuts for opening or saving recordsdata. I as an alternative typically must open the folder in Explorer the place the code file is, so I modified the shortcut for Open to CTRL+ALT+O and used CTRL+O for Open Folder in Explorer.)

I believe maybe so. One thing might need modified when changing the menu to Qt menus, as we will not even do the session shortcut change.

The preliminary focus of the modeling space is a identified concern I believe.

What’s below the cursor ought to obtain the keyboard messages, if the article doesn’t use the shortcut or keycode then it might both bubble as much as the father or mother window or not relying upon design.

Thanks for the replies everybody.

I initially thought that I had executed one thing not appropriate with mannequin.start_operation and .commit_operation.

With a brand new day and a cup of espresso, this concern is the Alt key not releasing the Menu Bar focus bug.

I’ve many shortcuts that use Alt + for assigning tags which had escaped my discover.

ctrl z was not working as a result of the Menu Bar had focus and the explanation Alt+Backspace labored was as a result of urgent Alt launched the menu bar focus.

Hopefully this bug goes to be fastened quickly. I’ve some keyboard shortcuts that embody Alt, too. Urgent Alt once more releases the main target. I’m hoping the repair comes quickly earlier than the second press of Alt is embedded into muscle reminiscence.



1 Like

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments