-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use system clipboard for hitobjects in the editor #27707
base: master
Are you sure you want to change the base?
Use system clipboard for hitobjects in the editor #27707
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aside from the framework prereq
@@ -16,6 +16,8 @@ public class ClipboardContent | |||
[JsonConverter(typeof(TypedListConverter<HitObject>))] | |||
public IList<HitObject> HitObjects; | |||
|
|||
public const string CLIPBOARD_FORMAT = "osu/hitobjects"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a valid mime format, should probably be something like application/x-osu-hitobjects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.rfc-editor.org/rfc/rfc6838.html#section-3.4
Subtype names with "x." as the first facet may be used for types
intended exclusively for use in private, local environments.
https://www.rfc-editor.org/rfc/rfc6838.html#section-4.2.8
Since this was published, the de facto practice has arisen for using
this suffix convention for other well-known structuring syntaxes. In
particular, media types have been registered with suffixes such as
"+der", "+fastinfoset", and "+json". This specification formalizes
this practice and sets up a registry for structured type name
suffixes.
So it should be application/x.osu.hitobjects+json
.
Please note that web custom formats are prefixed with web
in the javascript API (an image/png
and web image/png
can be different things). I'm still thinking about how this should be handled.
Uses the system clipboard when copy-pasting hitobjects in the editor. When copying hitobjects, 2 clipboard entries will be created:
text/plain
: contains the timestamposu/hitobjects
: contains the json-serialized version of the copied hitobjectsThis allows copy-pasting objects between osu and external tools.
2024-03-24.02-04-50.mp4